Skip to content

Merge pull request #152 from Serhii-DV/dev #14

Merge pull request #152 from Serhii-DV/dev

Merge pull request #152 from Serhii-DV/dev #14

name: Build Chrome Extension
on:
push:
branches:
- main
jobs:
build_extension:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run npm build
run: npm run build
- name: Get the current tag or commit hash
id: get_version
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "no-tag")
if [ "$TAG" = "no-tag" ]; then
TAG=$(git rev-parse --short HEAD)
fi
echo "TAG_VERSION=$TAG" >> $GITHUB_ENV
- name: Upload dist folder as an artifact
uses: actions/upload-artifact@v4
with:
name: bandcamp-to-discogs-extension-${{ env.TAG_VERSION }}
path: dist/