Skip to content

v0.2.0-rc.1

v0.2.0-rc.1 #20

Workflow file for this run

name: Build and upload bundle
on:
release:
types: [published]
push:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm clean-install
- run: npm run build
- run: node_modules/.bin/esbuild --target=es6 --bundle --minify --outdir=esbuild --global-name=age .
- uses: actions/upload-artifact@v4
with:
name: age-esbuild
path: esbuild/typage.js
upload:
if: github.event_name == 'release'
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: age-esbuild
- run: gh release upload "$VERSION" "typage.js#age-${VERSION#v}.min.js"
env:
VERSION: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ github.token }}
publish:
if: github.event_name == 'release'
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- run: npm clean-install
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}