From 0796a4ec1fc0c27feb44b47eafe103fe18da1e48 Mon Sep 17 00:00:00 2001 From: jdabbech-ledger Date: Fri, 23 Aug 2024 18:08:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20(othr):=20Add=20snapshot=20relea?= =?UTF-8?q?se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/snapshot_release.yml | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/snapshot_release.yml diff --git a/.github/workflows/snapshot_release.yml b/.github/workflows/snapshot_release.yml new file mode 100644 index 000000000..689b5be05 --- /dev/null +++ b/.github/workflows/snapshot_release.yml @@ -0,0 +1,47 @@ +name: publish snapshot version of npm packages +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + inputs: + ref: + description: The base branch to publish a snapshot release from + required: true + default: "develop" + tag: + description: Snapshot version name + required: false + default: "" + +env: + FORCE_COLOR: "1" + # if no inputs it's considered as a cron job + REF: ${{ inputs.ref || 'develop' }} + TAG: ${{ inputs.tag || 'develop' }} + +jobs: + version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.REF }} + + - uses: ./.github/actions/setup-toolchain-composite + + - name: install dependencies + run: pnpm install + + - name: build libraries + run: pnpm build + + - name: create release pull request or publish + uses: changesets/action@v1 + with: + version: pnpm bump --snapshot ${{ env.TAG }} + publish: pnpm release --no-git-tag + commit: "🔖 (snapshot-release): versioning packages" + title: "🔖 (snapshot-release) [NO-ISSUE]: versioning packages" + env: + GITHUB_TOKEN: ${{ github.token }} + NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}