v3.1.1 π #20
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 to NPM | |
on: | |
release: | |
types: [published] | |
env: | |
CI: true | |
jobs: | |
build-and-test: | |
name: π― Run tests (Node ${{ matrix.node }} / TS ${{ matrix.typescript }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16, 18, 20] | |
typescript: | |
[ | |
"~4.6.4", | |
"~4.7.4", | |
"~4.8.3", | |
"~4.9.5", | |
"~5.0.4", | |
"~5.1.6", | |
"~5.2.2", | |
"~5.3.3", | |
"~5.4.2", | |
"latest", | |
] | |
steps: | |
- name: β»οΈ Checkout | |
uses: actions/checkout@v3 | |
- name: π Install node_modules | |
uses: ./.github/actions/install-node-modules | |
with: | |
node-version: ${{ matrix.node }} | |
typescript-version: ${{ matrix.typescript }} | |
- name: π― Run tests | |
run: yarn test | |
release: | |
name: π Release | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
steps: | |
- name: β»οΈ Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: π Install node_modules | |
uses: ./.github/actions/install-node-modules | |
with: | |
node-version: 18 | |
- name: ποΈ Clear lib directory | |
run: rm -rf lib | |
- name: ποΈ Clear builds directory | |
run: rm -rf builds | |
- name: π Set package version | |
run: yarn set-package-version ${{ github.event.release.tag_name }} | |
- name: ποΈ Build | |
run: yarn build | |
- name: ποΈ Build for Deno | |
run: yarn rollup -c | |
- name: πΎ Commit Deno Build | |
uses: EndBug/[email protected] | |
with: | |
default_author: github_actions | |
message: "${{ github.event.release.tag_name }} release" | |
- name: π Release | |
uses: JS-DevTools/npm-publish@v2 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
strategy: upgrade |