v3.1.0 π #19
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: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16, 18] | |
typescript: ["~4.5.5", "~4.6.4", "~4.7.4", "~4.8.3", "~4.9.5", "~5.0.4"] | |
name: Node ${{ matrix.node }} / TS ${{ matrix.typescript }} | |
steps: | |
- 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: | |
runs-on: ubuntu-latest | |
name: Release | |
needs: build-and-test | |
steps: | |
- 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: Building deno build | |
run: yarn rollup -c | |
- uses: EndBug/add-and-commit@v9.1.3 | |
with: | |
default_author: github_actions | |
message: "${{ github.event.release.tag_name }} release" | |
- uses: JS-DevTools/npm-publish@v2 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
strategy: upgrade |