GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: Use 'gh release' to upload assets to release by seisman · Pull Request #3187 · GenericMappingTools/pygmt

Conversation

@seisman

@seisman seisman commented Apr 21, 2024

Copy link
Copy Markdown
Member

Description of proposed changes

Use gh release to upload assets to release, so we don't need to use the shogo82148/actions-upload-release-asset action anymore.

Reference: https://michael-mckenna.com/how-to-upload-file-to-github-release-in-a-workflow/

The same commit was pushed to my own fork (https://github.com/seisman/pygmt). See https://github.com/seisman/pygmt/actions/runs/8772441014 for the workflow run and the testing release https://github.com/seisman/pygmt/releases/tag/v0.12.0.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@seisman
CI: Use 'gh release' to upload assets to release
add563d
@seisman seisman added maintenance Boring but important stuff for the core devs final review call This PR requires final review and approval from a second reviewer labels Apr 21, 2024
@seisman seisman added this to the 0.12.0 milestone Apr 21, 2024
michaelgrund
michaelgrund approved these changes Apr 21, 2024
View reviewed changes
weiji14
weiji14 reviewed Apr 21, 2024
View reviewed changes
Comment thread .github/workflows/release-baseline-images.yml
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: baseline-images.zip
run: gh release upload ${{ github.ref_name }} baseline-images.zip

@weiji14 weiji14 Apr 21, 2024

Copy link
Copy Markdown
Member

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.

The blog post you linked uses github.event.release.tag_name instead of github.ref_name. I had a look at https://docs.github.com/en/actions/learn-github-actions/contexts#github-context, and I suppose they're the same for tags (e.g. v0.12.0), but I suppose github.ref_name would be safer if we need to re-run the workflow, say if the dvc pull step failed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@seisman seisman Apr 21, 2024

Copy link
Copy Markdown
Member Author

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.

Just triggered another run of the workflow in my own fork (https://github.com/seisman/pygmt/actions/runs/8772441014/job/24079741738).

  gh release upload v0.12.0 baseline-images.zip
  shell: /usr/bin/bash -e {0}
  env:
    GH_TOKEN: ***

github.ref_name is v0.12.0 for the manually triggered run. I guess github.ref_name is better.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

weiji14 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
weiji14
weiji14 approved these changes Apr 22, 2024
View reviewed changes
@seisman
seisman merged commit 11a1bc1 into main Apr 22, 2024
@seisman
seisman deleted the ci/release-assets branch April 22, 2024 00:51
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@michaelgrund michaelgrund michaelgrund approved these changes
@weiji14 weiji14 weiji14 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Milestone

0.12.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@seisman @michaelgrund @weiji14
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.