Skip to content

.github/workflows/tags.yml #4

.github/workflows/tags.yml

.github/workflows/tags.yml #4

Workflow file for this run

on:
push:
tags:
- '*'
jobs:
angular:
uses: ./.github/workflows/angular.yml
release-lib-on-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: lib-build
path: dist/ngx-openlayers/
- uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_JS_VERSION}}
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v3
with:
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'
- run: cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md
- run: cd dist/ngx-openlayers/ && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
needs:
- angular
release-lib-on-gh:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: lib-build
path: dist/ngx-openlayers/
- id: check-tag
run: |
if echo "${{ github.event.ref }}" | grep -Eq "^refs/tags/[0-9]+.[0-9]+.[0-9]+-.*$"; then
echo "prerelease=true" >> $GITHUB_OUTPUT
fi
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/ngx-openlayers/"
prerelease: ${{ steps.check-tag.outputs.prerelease == 'true' }}
needs:
- angular
deploy-demo-on-gh-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: demo-build
path: .
- uses: actions/upload-pages-artifact@v2
with:
path: .
- uses: actions/deploy-pages@v2
id: deployment
needs:
- angular