Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow for releasing and publishing pa…
Browse files Browse the repository at this point in the history
…ckage
  • Loading branch information
teles committed May 18, 2024
1 parent d2fd41d commit 4639071
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,25 @@ jobs:
# - name: Run tests
# run: npm test

- name: Bump version and create tag
- name: Bump version
id: bump_version
run: |
NEW_TAG=$(npx standard-version --dry-run | grep "tagging release" | awk '{print $3}')
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
# Incrementa a versão usando standard-version
npx standard-version --release-as patch
# Obter nova versão
NEW_VERSION=$(node -p "require('./package.json').version")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
# Adiciona commit e tag
git push --follow-tags origin main
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ env.NEW_TAG }}
release_name: Release ${{ env.NEW_TAG }}
tag_name: "v${{ env.NEW_VERSION }}"
release_name: Release ${{ env.NEW_VERSION }}
body: |
Release notes for ${{ env.NEW_TAG }}
Release notes for ${{ env.NEW_VERSION }}
draft: false
prerelease: false
env:
Expand Down

0 comments on commit 4639071

Please sign in to comment.