Skip to content

Commit

Permalink
feat: add WIP publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Apr 10, 2023
1 parent e3b7d82 commit 38cf96a
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
name: Publish release

on:
workflow_dispatch:
release:
types: [created]

jobs:
install:
name: Install node
build:
name: Build files
runs-on: self-hosted

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16

node-version: 16
cache: 'npm'
- name: Install npm packages
run: npm install

build:
name: Build and bundle
runs-on: self-hosted

steps:
- uses: install
- name: Run npm build
- name: Test with vitest
run: npm test
- name: Build with Vite
run: npm run build

publish:
name: Package and sign build results
name: Publish release
runs-on: self-hosted

steps:
- uses: build
- name: Package and sign
env:
FIREFOX_TOKEN: ${{ secrets.FIREFOX_TOKEN }}
needs: build
permissions:
contents: read
deployments: write

run: |
npm run publish -- --token: ${{ env.FIREFOX_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Sign Firefox
run: npm run sign -- --api-secret ${{secrets.FIREFOX_TOKEN}}

0 comments on commit 38cf96a

Please sign in to comment.