GH Actions review #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Dev Branch to VSIX | |
# The workflow will trigger only when changes are pushed to the 'dev' branch | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
Compile-VSIX: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: Install dependencies | |
run: npm install --frozen-lockfile | |
- name: Setup VSCE | |
run: npm install -g vsce | |
# - name: Test | |
# run: npm test | |
- name: Package | |
if: success() # Only upload if the previous 'Test' step succeeded | |
run: npm run package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ttslua-dev-${{ steps.vars.outputs.sha_short }} | |
path: '*.vsix' |