v3.5.1 #27
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: Monorepo CD | |
on: | |
release: | |
types: | |
- published | |
env: | |
NODE_VERSION: 20 | |
CWD: ./src | |
jobs: | |
get-version: | |
name: Get Version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.get_version.outputs.version-without-v }} | |
steps: | |
- name: Get Version | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Log Version | |
shell: pwsh | |
run: Write-Host ${{ steps.get_version.outputs.version-without-v }} | |
ci: | |
needs: | |
- get-version | |
name: Run Monorepo CI | |
uses: ./.github/workflows/src-ci.yml | |
with: | |
version: ${{ needs.get-version.outputs.version }} | |
secrets: inherit | |
deploy: | |
needs: | |
- get-version | |
- ci | |
name: Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
cache-dependency-path: ${{ env.CWD }}/package-lock.json | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
working-directory: ${{ env.CWD }} | |
run: npm ci | |
- name: Download Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: Build | |
path: ${{ env.CWD }}/dist | |
- name: Get Latest Tag | |
uses: tobysmith568/npm-publish-latest-tag@v1 | |
id: latest_tag | |
with: | |
package-json: ${{ env.CWD }}/dist/packages/generate-license-file/package.json | |
- name: Download Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: Build | |
path: ${{ env.CWD }}/dist | |
- name: Publish | |
working-directory: ${{ env.CWD }} | |
run: npx nx run-many --target publish --args="--tag=${{ steps.latest_tag.outputs.latest-tag }}" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} |