Skip to content

build: Add release action #231

build: Add release action

build: Add release action #231

Workflow file for this run

name: Codicons Build
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build font
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: codicon-font-${{ github.sha }}
path: dist/codicon.ttf
publish:
- name: Write release notes

Check failure on line 35 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 35
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