Skip to content

Commit

Permalink
add releases workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Jul 13, 2023
1 parent c8cb580 commit ba92a19
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: release

on:
workflow_dispatch:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]

jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Install vsce
run: npm i -g @vscode/vsce

- name: Inject version from tag
run: npx gitv

- name: Install packages
run: npm install

- name: Build
run: npm run build

- name: Create Extension Package
run: vsce package

- name: Get Package Version
id: get_version
run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: goatfile-${{ env.VERSION }}.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ba92a19

Please sign in to comment.