chore(update): release 1.3.0 π #15
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: Build & Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
install-and-build: | |
name: π οΈ Install & Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: ποΈ Checkout | |
uses: actions/checkout@v4 | |
- name: ποΈ Setup node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: 'https://registry.npmjs.org' | |
- name: π οΈ Install | |
uses: ./.github/actions/cached-deps | |
- name: π οΈ Sync versions | |
run: yarn script:sync-projects | |
- name: π§Ή Lint | |
run: yarn lint | |
- name: π§ͺ Run tests | |
run: yarn test:jest | |
- name: β¬οΈ Upload coverage reports | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: false | |
dry_run: false | |
- name: π¦ Build demo app | |
run: yarn build:demo --base-href https://celtian.github.io/ngx-app-version/ | |
- name: π¦ Build ngx-app-version | |
run: yarn build | |
- name: π Publish NPM | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
run: cd dist/ngx-app-version && npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: π Publish NPM BETA | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == true | |
run: cd dist/ngx-app-version && npm publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: π οΈ Set up package for GPR | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
run: yarn script:gpr-setup | |
- name: π οΈ Use GPR | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@celtian' | |
- name: π Publish to GitHub Package Registry | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
run: | | |
cd dist/ngx-app-version | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{github.token}} | |
- name: π οΈ Copy index.html to 404.html | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
run: cp ./dist/demo/browser/index.html ./dist/demo/browser/404.html | |
- name: π Deploy Github Pages | |
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
publish_branch: gh-pages | |
publish_dir: ./dist/demo/browser |