diff --git a/.github/workflows/on-push-to-main.yml b/.github/workflows/on-push-to-main.yml index f9d3362..e172405 100644 --- a/.github/workflows/on-push-to-main.yml +++ b/.github/workflows/on-push-to-main.yml @@ -13,7 +13,7 @@ jobs: uses: ./.github/workflows/verify.yml secrets: inherit - artifacts: - name: Artifacts - uses: ./.github/workflows/artifacts.yml + prerelease: + name: Prerelease + uses: ./.github/workflows/prerelease.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..f522d89 --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,39 @@ +name: Prerelease +on: + workflow_call: + workflow_dispatch: + +jobs: + prerelease: + name: Prerelease + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install dependencies + uses: ./.github/actions/install-dependencies + + - name: Set version + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + npm version 0.0.0-$(date +'%Y%m%dT%H%M%S') + git push --tags + + - name: Build + run: bun run build + + - name: Zip + run: cd dist/build && zip -r ../extension.zip * + + - name: Get NPM version + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: dist/extension.zip + tag_name: 'v${{ steps.package-version.outputs.current-version }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d55b7c4..e099148 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,6 @@ jobs: - name: Submit to Chrome Web Store uses: PlasmoHQ/bpp@v3.5.0 - continue-on-error: true with: artifact: ./dist/extension.zip keys: ${{ secrets.BPP_KEYS }}