Skip to content

v0.1.0

v0.1.0 #1

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- name: Set version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
npm version "$VERSION" --no-git-tag-version
- run: npm run build
- run: npm test
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Verify publication
run: |
VERSION="${GITHUB_REF_NAME#v}"
sleep 10
npm view @fiale-plus/fred-cli@"$VERSION"