Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix release #2

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -31,5 +31,40 @@ jobs:
- name: test
uses: ./.github/actions/test

- name: publish
uses: ./.github/actions/publish
# Bump version
- name: Bump package version
shell: bash
run: |
yarn version $RELEASE_TYPE
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
echo "NEW_VERSION=$(jq -r '.version' < package.json)" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ inputs.releaseType }}

- name: Update CHANGELOG.md
uses: 'zen8sol/[email protected]'
with:
newVersion: '${{ env.NEW_VERSION }}'

# Publish package
- name: Publish
shell: bash
run: |
echo -e "\nnpmAuthToken: '${{ env.NODE_AUTH_TOKEN }}'" >> ./.yarnrc.yml
yarn npm publish --access public --tag ${{ env.RELEASE_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Commit
- name: Commit CHANGELOG.md and package.json changes and create tag
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Hexancore Bot"
git add "package.json"
git add "CHANGELOG.md"
git commit -m "chore: release ${{ env.NEW_VERSION }}"
git tag -m 'new version' ${{ env.NEW_VERSION }}
git push --follow-tags
#- name: publish
# uses: ./.github/actions/publish
Loading