Skip to content

Commit

Permalink
ci: prerelease action
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Oct 2, 2023
1 parent 771dcbe commit 959b26a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
39 changes: 39 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -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 }}'
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 959b26a

Please sign in to comment.