Skip to content

Commit

Permalink
build: Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
hbons committed Feb 26, 2024
1 parent 5f4aaf3 commit 80e9a45
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Codicons Build
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -28,3 +30,37 @@ jobs:
with:
name: codicon-font-${{ github.sha }}
path: dist/codicon.ttf

publish:
runs-on: ubuntu-latest

steps:
- name: Write release notes
if: startsWith(github.ref, 'refs/tags/')
run: |
commits=$(git log --pretty=format:"- %h: %s%n (%H)%n" ${{ github.event.before }}..${{ github.sha }})
echo "This release includes: ${commits}" > release_notes.txt
# Create a release when a new tag is pushed. Writes out all new commit messages since the last release.
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: $(cat release_notes.txt)
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub Actions"
# git clone https://github.com/microsoft/vscode.git
# cd vscode
# git checkout -b update-codonicons
# cp -r ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
# git add .
# git commit -m "Update codicons to ${{ github.ref }}"
# git push origin update-font
# # TODO: Create PR

0 comments on commit 80e9a45

Please sign in to comment.