Merge 0.2.0 #259
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: Create and publish a package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 19.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
- run: npm ci | |
# - uses: satackey/[email protected] | |
# continue-on-error: true | |
- run: npm run build | |
- name: Upload build folder artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: "build/*" | |
package: | |
needs: [build] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 19.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
- name: Download build folder artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: ./build | |
- run: npm version prerelease --preid=ci-$GITHUB_RUN_ID --no-git-tag-version | |
- run: npm pack | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: package | |
path: "*.tgz" | |
publish: | |
name: "Publish to GitHub Packages" | |
needs: [package] | |
runs-on: ubuntu-22.04 | |
if: github.repository_owner == 'banou26' | |
steps: | |
- name: Download package artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: package | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 19.x | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@banou26" | |
- run: echo "registry=https://npm.pkg.github.com/@banou26" >> .npmrc | |
- run: npm publish $(ls *.tgz) | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
# - uses: actions/delete-package-versions@v1 | |
# with: | |
# package-name: 'libav-wasm' |