-
-
Notifications
You must be signed in to change notification settings - Fork 53
Update example release.yml in GitHub Actions documentation #59
base: main
Are you sure you want to change the base?
Conversation
Thank you for this! Didn't realize it had changed. I'll review this ASAP |
Just tried this one and still getting warnings on the Release step. |
You're right. Those deprecation warnings are coming from This PR has some discussion on the same issue. One of the users in that thread recommends using ncipollo/release-action instead. It looks like a promising alternative. When I get a chance, I'll try out |
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is this necessary? I haven't seen any issues leaving this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right, I don't think this is needed either. Will remove fetch-depth
in the next commit.
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
fetch-depth: 0 # Otherwise, pushing refs to destination repository fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, but I'll remove this line in response to this conversation.
- name: Package | ||
run: | | ||
mkdir ${{ github.event.repository.name }} | ||
cp main.js manifest.json styles.css README.md ${{ github.event.repository.name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp main.js manifest.json styles.css README.md ${{ github.event.repository.name }} | |
cp main.js manifest.json styles.css README.md ${{ github.event.repository.name }} |
This assumes that the developer uses the plugin id as the repository name. To be honest, I'm not sure whether Obsidian cares about the zip file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think Obsidian cares about the zip file, either. I do think it's convenient to have it if someone wants to download the compiled artifacts and not the .zip
of the source tree that GitHub gives by default.
I like the way that advanced-tables is doing it -- the plugin name is set in the env
block toward the top.
I will push a commit in the near future which fixes this and several other things mentioned above.
Change `node-version` to current LTS (18.x). Co-authored-by: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com>
Remove unneeded `--if-present` in `build` section. Co-authored-by: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com>
@afhoffman I switched over to use that. Here's an example https://github.com/rubyatscale/use_packwerk/blob/main/.github/workflows/cd.yml |
Any updates on this? |
I've just made a few changes here:
The
Build
andPackage
steps have been separated in line with the discussion linked in the documentation.GitHub has deprecated the set-output command. I updated that call on line 39 in the new version to use an environment file.
actions/upload-release-asset
is no longer maintained. The ReadMe in the repo for that action suggests using softprops/action-gh-release instead which does shorten the code up quite a bit as it allows uploading all assets in one action rather than one action per asset.I have this pipeline live in my fork of dethau's workflow-experiments repo.