(extension) v0.17.1 #45
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: Release Package | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
# uses version from package.json > packageManager | |
- name: Install and build dependencies | |
run: | | |
pnpm install | |
pnpm build | |
- name: Package | |
run: | | |
cd packages/danmaku-anywhere | |
pnpm package | |
pnpm build:firefox | |
pnpm package:firefox | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package-files | |
path: packages/danmaku-anywhere/package/*.zip | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write # required by ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: package-files | |
path: packages | |
- name: Print current directory | |
run: | | |
ls -al | |
pwd | |
- name: Publish Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "packages/*" | |
generateReleaseNotes: true | |
prerelease: true | |
publish-chrome: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: chrome-web-store-publish | |
steps: | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: package-files | |
path: packages | |
- name: Print current directory | |
run: | | |
ls -al | |
pwd | |
- name: Publish to Chrome Web Store | |
uses: mnao305/[email protected] | |
with: | |
file-path: "packages/*chrome.zip" | |
extension-id: ${{ vars.EXTENSION_ID }} | |
client-id: ${{ secrets.CLIENT_ID }} | |
client-secret: ${{ secrets.CLIENT_SECRET }} | |
refresh-token: ${{ secrets.REFRESH_TOKEN }} | |
glob: true |