From 6a1a6c88fd6d7736c22ac44844141795423d7f26 Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Wed, 20 Nov 2024 09:01:42 +0100 Subject: [PATCH] Create github actions workflow for snapshot releases --- .changeset/config.json | 4 ++++ .github/workflows/publish-snapshot.yml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/publish-snapshot.yml diff --git a/.changeset/config.json b/.changeset/config.json index 75be7a6..2eae7a1 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -13,6 +13,10 @@ "version": false, "tag": false }, + "snapshot": { + "useCalculatedVersion": true, + "prereleaseTemplate": "{tag}.{datetime}" + }, "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 0000000..bb4dd8a --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,25 @@ +name: Publish snapshot +on: + workflow_dispatch: +jobs: + build_packages: + name: "Build and publish" + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install + uses: ./.github/actions/install + + - name: Build packages + run: pnpm build-packages + + # Bumps versions in package.json (see https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md) + # The changes should not be committed to any branch: the "releases" are not part of the version history. + - name: Version packages + run: pnpm changeset version --snapshot dev + + - name: Publish packages + run: pnpm publish -r --access public --tag dev \ No newline at end of file