Skip to content

Commit

Permalink
build: add manual workflow (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickarlt authored Apr 26, 2024
1 parent e2231cd commit edd9465
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
66 changes: 66 additions & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build, Test, Release

# On pushes to master (i.e. merging a PR)
# run all tests, on win, macos, linux, on node 12 & 14
on: workflow_dispatch

jobs:
# First, build and test on multiple os's
# and multuple versions of node
build_and_test:
name: Build and Test

runs-on: ${{ matrix.os }}

# PRs will run tests on node 14,16 on ubuntu, macos and windows
# so for the release, we're just running node 16@ubuntu
strategy:
matrix:
os: [ubuntu-latest]
node: [18]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Test in Chrome
run: npm run test:chrome:ci

- name: Test in Node
run: npm run test:node

- uses: codecov/codecov-action@v1
with:
directory: ./coverage

# If the build and test works, run a release
release:
name: Release
needs: [build_and_test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release:dry
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit edd9465

Please sign in to comment.