fix: attempt #8
Workflow file for this run
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: Build and Tag for Release | |
on: | |
push: | |
branches: | |
- publish | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# --- SETUP --- | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
# --- BUILD --- | |
- name: Install dependencies | |
run: npm install | |
- name: Build extension | |
run: npm run prod | |
- name: Prepare source code zip | |
run: zip -r releases/save-my-phind_${{ github.run_number }}_firefox_source.zip src/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-assets | |
path: releases/ | |
# --- TAG --- | |
- name: Get version from package.json | |
id: package_version | |
run: echo "::set-output name=version::$(node -p "require('./package.json').version")" | |
- name: Create Tag | |
run: git tag v${{ steps.package_version.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Tag | |
run: git push origin v${{ steps.package_version.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |