Skip to content

Commit 741da1f

Browse files
committed
build: Add release action
1 parent 5f4aaf3 commit 741da1f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/build.yml

+29
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Codicons Build
33
on:
44
push:
55
branches: [ main ]
6+
tags:
7+
- '*'
68
pull_request:
79
branches: [ main ]
810
workflow_dispatch:
@@ -28,3 +30,30 @@ jobs:
2830
with:
2931
name: codicon-font-${{ github.sha }}
3032
path: dist/codicon.ttf
33+
34+
# Create a release when a new tag is pushed. Writes out all new commit messages since the last release.
35+
- name: Create Release
36+
if: startsWith(github.ref, 'refs/tags/')
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
commits=$(git log --pretty=format:"- %h: %s%n (%H)%n" ${{ github.event.before }}..${{ github.sha }})
42+
echo "This release includes: ${commits}" > commit_messages.txt
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: Release ${{ github.ref }}
46+
draft: false
47+
prerelease: false
48+
body: $(cat commit_messages.txt)
49+
# run: |
50+
# git config --global user.email "[email protected]"
51+
# git config --global user.name "GitHub Actions"
52+
# git clone https://github.com/microsoft/vscode.git
53+
# cd vscode
54+
# git checkout -b update-codonicons
55+
# cp -r ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
56+
# git add .
57+
# git commit -m "Update codicons to ${{ github.ref }}"
58+
# git push origin update-font
59+
# # TODO: Create PR

0 commit comments

Comments
 (0)