Skip to content

Commit

Permalink
feat: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Apr 12, 2023
1 parent 3efe97f commit 051b187
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
name: CI
timeout-minutes: 10
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- name: Use Node 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Clean Install
run: npm ci

- name: Test
run: npm test -- --run
36 changes: 10 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
name: Publish release
name: Publish Release

on:
workflow_dispatch:
release:
types: [created]

jobs:
build:
name: Build files
publish:
name: Publish to Firefox
timeout-minutes: 10
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
- name: Use Node 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- name: Install npm packages
run: npm install
- name: Test with vitest
run: npm test
- name: Build with Vite
run: npm run build

publish:
name: Publish release
runs-on: self-hosted
cache-dependency-path: '**/package-lock.json'

needs: build
permissions:
contents: read
deployments: write
- name: Clean Install
run: npm ci

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

0 comments on commit 051b187

Please sign in to comment.