Skip to content

Commit

Permalink
chore: add release snapshot workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jul 23, 2024
1 parent 1fc2ee4 commit c2c7801
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Snapshot

on:
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
SUI_VERSION: mainnet-v1.25.3

jobs:
release-snapshot:
name: Release Snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Check for changeset files
id: checkfile
run: |
if ls .changeset/*.md | grep '\.changeset\/[a-z-]\+\.md$'; then
echo "has_file=true" >> "$GITHUB_OUTPUT"
else
echo "has_file=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup Sui CLI and install dependencies
uses: ./.github/actions/install
with:
SUI_VERSION: ${{ env.SUI_VERSION }}

- name: Set snapshot version
run: |
npm version 0.0.0-snapshot.$(git rev-parse --short HEAD) --git-tag-version=false
- name: Publish snapshots to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm publish --no-git-checks --tag snapshot --access public

0 comments on commit c2c7801

Please sign in to comment.