Merge pull request #64 from chunkypixel/dependabot/npm_and_yarn/js-ya… #16
This file contains hidden or 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: Build Atari Dev Studio (VS Code Extension) in Github | |
| on: | |
| push: | |
| branches: [ master ] # Or your default branch, e.g., master | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: # Enables manual triggers | |
| inputs: | |
| environment: # Optional input example | |
| description: 'Environment to build for (e.g., dev, prod)' | |
| required: false | |
| default: 'prod' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest # Linux is fine for Node.js-based extensions; use matrix for multi-OS if needed | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 # Required to access your repo files, including the Makefile | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' # Use a recent LTS version; match your local setup | |
| - name: Install VSCE | |
| run: npm install --save-dev @vscode/vsce | |
| - name: Get version from package.json | |
| run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV | |
| - name: Run Makefile to compile and package | |
| run: make VERSION=$VERSION # This executes the 'all' target by default | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: atari-dev-studio-${{ env.VERSION }}-vsix | |
| path: atari-dev-studio-*.vsix # Wildcard matches the versioned file |