Skip to content

Publish

Publish #8

Workflow file for this run

name: Publish
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
# eslint-config
- run: npm i --ignore-scripts
working-directory: npm/packages/eslint-config
- run: npm run build
working-directory: npm/packages/eslint-config
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/eslint-config/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/eslint-config/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# library-build
- run: npm i --ignore-scripts
working-directory: npm/packages/library-build
- run: npm run build
working-directory: npm/packages/library-build
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/library-build/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/library-build/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# utils
- run: npm i --ignore-scripts
working-directory: npm/packages/utils
- run: npm run build
working-directory: npm/packages/utils
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/utils/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/utils/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# form
- run: npm i --ignore-scripts
working-directory: npm/packages/form
- run: npm run build
working-directory: npm/packages/form
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/form/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/form/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# autosuggest
- run: npm i --ignore-scripts
working-directory: npm/packages/autosuggest
- run: npm run build
working-directory: npm/packages/autosuggest
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/autosuggest/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/autosuggest/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# date-time
- run: npm i --ignore-scripts
working-directory: npm/packages/date-time
- run: npm run build
working-directory: npm/packages/date-time
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/date-time/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/date-time/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# file-upload
- run: npm i --ignore-scripts
working-directory: npm/packages/file-upload
- run: npm run build
working-directory: npm/packages/file-upload
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance --tag beta
working-directory: npm/packages/file-upload/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta')
continue-on-error: true
run: npm publish --provenance
working-directory: npm/packages/file-upload/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}