v0.1.23 #32
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Node.js Package | |
on: | |
release: | |
types: [created] | |
env: | |
CI: true | |
jobs: | |
build: | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get the version | |
id: get_version | |
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Release version | |
run: | | |
echo $RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
- name: Use Node.js (NPMJS) ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
always-auth: true | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build --if-present | |
- name: Publish NPMJS @fdmg | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
continue-on-error: true | |
- name: Publish NPMJS @fdmg (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
continue-on-error: true | |
- name: Use specific package.json for GHP | |
run: cp ./dist/package.github.json ./dist/package.json | |
- name: Publish NPMJS @fdmediagroep | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
continue-on-error: true | |
- name: Publish NPMJS @fdmediagroep (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
continue-on-error: true | |
- name: Use Node.js (GitHub) ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
always-auth: true | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@FDMediagroep' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish GPR | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: Publish GPR (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |