Skip to content

Commit

Permalink
Merge pull request #137 from team-monite/fix/release-workflow
Browse files Browse the repository at this point in the history
fix(proposal): release workflow visibility 🥽
  • Loading branch information
radist2s authored Jul 2, 2024
2 parents d8eeff2 + 38e2251 commit 1a342b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/curvy-carpets-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
12 changes: 11 additions & 1 deletion .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ concurrency:
# Do not cancel ✖︎ in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: false

env:
RELEASE_BRANCH: "origin/main"

jobs:
npm-publish:
name: Publish to NPM
runs-on: ubuntu-latest
if: github.repository == 'team-monite/monite-sdk' && github.ref_name == 'orgin/main'
permissions:
contents: write
environment: production
steps:
- name: Validate Release Branch
run: |
if [ "${{ github.ref_name }}" == "$RELEASE_BRANCH" ]; then
echo "✔︎ Branch '${{ github.ref_name }}' is a release branch '$RELEASE_BRANCH'. Continuing..."
else
echo "✖︎ Branch '${{ github.ref_name }}' is not a release branch '$RELEASE_BRANCH'. Exiting..." >&2
exit 1
fi
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down

0 comments on commit 1a342b7

Please sign in to comment.