-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π· (othr) [DSDK-364]: Setup snapshot releases (#211)
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |