Skip to content

Conversation

Yang-33
Copy link
Contributor

@Yang-33 Yang-33 commented Nov 14, 2024

Changes

Resolve #299

Rubygems provides a way to release gem with GitHub Actions officially. It seems it doesn't require personal access token. let's try to use it.

On publishing, this workflow calls bundle exec rake release, and it tries to push git tag. this doesn't match our use case. We always create release note with git tag in this repository at first (in other 5 bot sdk projects), and we want the workflow to publish(release) gem later.
This change modifies release task not to push git tag. I don't know if this works. Let me try it.

ref:

@Yang-33 Yang-33 requested review from mokuzon and zenizh November 14, 2024 12:59
Comment on lines +26 to +35
- name: Update version file with the release version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION=${{ github.event.inputs.version }}
else
VERSION=${{ github.event.release.tag_name }}
fi
VERSION=${VERSION#v}

sed -i "s/VERSION = \".*\"/VERSION = \"$VERSION\"/" lib/line/bot/api/version.rb
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is to avoid editing file to update version manually (

)

@Yang-33 Yang-33 enabled auto-merge (squash) November 14, 2024 14:05
@Yang-33 Yang-33 merged commit 150140f into line:master Nov 15, 2024
4 checks passed
@Yang-33
Copy link
Contributor Author

Yang-33 commented Nov 15, 2024

Though I added 0ae7daf after running this workflow, it worked~

@Yang-33 Yang-33 deleted the automate-publish branch November 22, 2024 02:15
@Yang-33 Yang-33 self-assigned this Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish to rubygems automatically

2 participants