Skip to content

Commit

Permalink
Update .github/workflows/release.yaml
Browse files Browse the repository at this point in the history
Co-authored-by: Mickael Bourgois <35171168+BourgoisMickael@users.noreply.github.com>
  • Loading branch information
tcarmet and BourgoisMickael committed Feb 18, 2025
1 parent c0dea69 commit 83629d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
TAG_EXISTS=$(git tag -l "${{ inputs.tag }}")
if [[ -n "$TAG_EXISTS" ]]; then
echo "::error::The tag ${{ inputs.tag }} has already been released"
echo "::error::The tag ${{ inputs.tag }} already exists"
exit 1
fi
- name: Ensure version is properly set
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: tests

on:
push:
branches-ignore:
- 'development/**'
on: push

permissions:
packages: write
Expand All @@ -27,9 +24,17 @@ jobs:
run: yarn lint_md
- name: lint javascript
run: yarn lint
- name: Set development version
run: yarn version --no-git-tag-version --new-version "0.0.0-sha.${{ github.sha }}"
- name: Set common env vars for npm publish
run: |
echo "SHORTSHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
echo "PKG_VERSION=$(yarn -s run get-version)" >> $GITHUB_ENV
- name: Set version for work in progress
run: yarn version --no-git-tag-version --new-version "0.0.0-sha.${SHORTSHA}"
if: !github.ref_protected
- name: Set version for protected branch
run: yarn version --no-git-tag-version --new-version "${PKG_VERSION}-sha.${SHORTSHA}"
if: github.ref_protected
- name: Publish development version
run: npm publish --provenance
run: npm publish --provenance --tag "${{ github.ref_name }}"
env:
NODE_AUTH_TOKEN: ${{ github.token }}

0 comments on commit 83629d8

Please # to comment.