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

Automate publish #339

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Automate publish #339

merged 2 commits into from
Nov 15, 2024

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:

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~

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