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 release process with a GitHub action #72

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Ebonsignori
Copy link

Adds the option for people who use this template to push version tags to automate (nearly) every part of a standard Obsidian release.

When pushing a valid tag, e.g. 1.2.3 this action:

  1. Updates manifest.json, package.json, and package-lock.json with the version from the tag.
  2. Commit the updates to your repo (that will need to be pulled down locally before making further changes).
  3. Creates a new GitHub release for the tag.

manifest.json
styles.css

- name: Upload artifacts for debugging
Copy link

@mwoz123 mwoz123 Sep 20, 2023

Choose a reason for hiding this comment

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

Build output artifacts (main.js, manifest.json nor styles.css) doesn't seem to be available anywhere on github.

Copy link

@wonderbird wonderbird Nov 21, 2023

Choose a reason for hiding this comment

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

Does moving the release.yml file into the (new) folder .github/workflows/ resolve the issue you have in mind, @mwoz123 ?

See commits from Nov. 21 in my fork of the obsidian-sample-plugin and corresponding release 0.0.1 there and my pull request to @Ebonsignori 's fork

# Creates a new GitHub Release when a tag is pushed
# See https://docs.obsidian.md/Plugins/Releasing/Submit+your+plugin#Step+2+Create+a+release
# Tag should be in the format of x.y.z without `v` prefix
# For example `1.0.0` is a valid tag, but `v1.0.0` is not
Copy link

Choose a reason for hiding this comment

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

Could you make usage of this GH action on your your fork? to illustrate what it does - cause your fork doesn't have any tags ;)

Copy link
Author

Choose a reason for hiding this comment

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

You can see examples in these repos. All of the releases are auto generated by the action

@@ -0,0 +1,80 @@
# Creates a new GitHub Release when a tag is pushed
Copy link

Choose a reason for hiding this comment

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

Is there a way to trigger it directly from GH UI? or it has to be done manually in the console by creating a tag and then pushing it to remote?

Copy link
Author

Choose a reason for hiding this comment

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

The workflow could be modified to accept a manual dispatch with the tag as the argument if you think this is a sufficient use case.

As it is I don't know that this PR will ever be merged so I might not put forth the effort to support this

.github/release.yml Outdated Show resolved Hide resolved
@chaintng
Copy link

Hi @mwoz123 , I recently create a new MR to do the CI automated for release, bump version also

Can u check is it okay to merge ?

Thanks

MR: #124

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.

4 participants