Skip to content

Commit

Permalink
ci: check releases
Browse files Browse the repository at this point in the history
  • Loading branch information
fpaul-1A committed Sep 16, 2024
1 parent dc027b9 commit 2e73864
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check releases
on:
workflow_dispatch:
schedule:
- cron: "20 * * * *"
permissions:
contents: read
issues: write
jobs:
findTags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.getTags.outputs.TAGS }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
fetch-tags: true
- run: |
TAGS=$(git tag -l | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | awk -F. '{print $1"."$2}' | uniq | xargs -I {} sh -c 'git tag -l "{}.*" | sort -V | tail -n 1' | xargs -d'\n' -I {} echo '"{}"' | tr '\n' ',')
echo "TAGS=[$TAGS]" >> "$GITHUB_OUTPUT"
id: getTags
checkRelease:
needs: findTags
runs-on: ubuntu-latest
strategy:
matrix:
tag: ${{ fromJSON(needs.findTags.outputs.tags) }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ matrix.tag }}
12 changes: 12 additions & 0 deletions .github/workflows/it-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
default: false
required: false
description: Skip the nx cache
ref:
type: string
default: ''
description: The branch, tag or SHA to checkout.
secrets:
NX_CLOUD_ACCESS_TOKEN:
required: false
Expand All @@ -27,7 +31,11 @@ jobs:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.ref }}
- uses: ./tools/github-actions/download-build-output
with:
artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }}
- uses: ./tools/github-actions/setup
- name: Setup verdaccio once for all tests
id: setup-verdaccio
Expand Down Expand Up @@ -64,7 +72,11 @@ jobs:
PREPARE_TEST_ENV_TYPE: ${{ matrix.testEnvironment }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.ref }}
- uses: ./tools/github-actions/download-build-output
with:
artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }}
- uses: ./tools/github-actions/setup
- shell: bash
run: |
Expand Down

0 comments on commit 2e73864

Please sign in to comment.