Skip to content

Commit

Permalink
Horrible hacks (#1425)
Browse files Browse the repository at this point in the history
* Horrible hacks

* jq

* Run `skuba format`

* sh

* Do we have bash?

* Tweak

* Tweak

---------

Co-authored-by: skuba <[email protected]>
  • Loading branch information
AaronMoat and seek-oss-ci authored Feb 6, 2024
1 parent 04e32fc commit 49b27d9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Setup jq
uses: dcarbone/[email protected]

- name: Publish to npm
uses: seek-oss/changesets-snapshot@v0
with:
pre-publish: pnpm run build
pre-version: ./scripts/snapshot-pre-version.sh
pre-publish: ./scripts/snapshot-pre-publish.sh
env:
GITHUB_TOKEN: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}
8 changes: 8 additions & 0 deletions scripts/snapshot-pre-publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -euxo pipefail

jq -r '.version = "'$(cat .changeset-version)'" + (.version | sub("0.0.0"; ""))' package.json > package.json.tmp
mv package.json.tmp package.json
rm .changeset-version
pnpm run build
7 changes: 7 additions & 0 deletions scripts/snapshot-pre-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euxo pipefail

pnpm changeset version
jq -r '.version' package.json > .changeset-version
git checkout .

0 comments on commit 49b27d9

Please sign in to comment.