Skip to content

Commit

Permalink
fix more issues with the release gha
Browse files Browse the repository at this point in the history
  • Loading branch information
wesgro committed Jul 11, 2024
1 parent 2894273 commit ba9bb13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ on:
release-type:
description: 'Release type (one of): patch, minor, major, prepatch, preminor, premajor, prerelease'
required: true
default: prerelease
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,7 +63,7 @@ jobs:
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Bump package pre-release version
# Use tag beta for pre-release versions
Expand All @@ -64,7 +73,7 @@ jobs:
echo "NEW_VERSION=$(npm --no-git-tag-version --preid=beta version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=beta" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Commit changes
- name: Commit package.json changes and create tag
Expand All @@ -77,11 +86,11 @@ jobs:
- name: Publish
run: npm publish --verbose --access public --tag ${{ env.RELEASE_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Push repository changes
- name: Push changes to repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin && git push --tags
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/wesgro/react-aria-menubutton-ts.git"
"url": "git+https://github.com/wesgro/react-aria-menubutton-ts.git"
},
"author": {
"name": "Jacob Ketcheson"
Expand Down

0 comments on commit ba9bb13

Please sign in to comment.