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

Rewrite release workflow #73

Merged
merged 6 commits into from
Jul 23, 2021
Merged

Rewrite release workflow #73

merged 6 commits into from
Jul 23, 2021

Conversation

solvaholic
Copy link
Owner

Objectives of these changes are:

  • Simplify docs/release.md, make it easier to use
  • Make creating the draft release more repeatable
  • Forget the vX.Y tag
  • Bump vX tag when new vX.Y.Z pushed, if vX.Y.Z matches the latest release

733af29 accommodates an excessively long line resulting from where I put credentials for the tag create/push work.

See also #64 and #55

@solvaholic solvaholic added the enhancement New feature or request label Jul 21, 2021
@solvaholic solvaholic self-assigned this Jul 21, 2021
and clean up a comment in update-major.yml
to put the release creation logic all in that step, and to intentionally
deal with the release branch already existing or not.

I feel like this workflow should fail if the release tag already exists.
But I'm unsure, so leaving it like this to see how that goes.
and learn, again, to lint locally before committing and pushing.
@solvaholic
Copy link
Owner Author

Woohoo! Test run of release.yml made it most of the way through. All the way up to here:

image

I'll try single-quoting the JSON in the step output, per https://github.saobby.my.eu.orgmunity/t/output-json-string-from-one-action-and-use-it-in-a-workflow-step

@solvaholic
Copy link
Owner Author

Those single-quotes got to the same complaint and exit code 127.

fromJSON() returned, as documented, an object:

_data="Object"

toJSON(fromJSON()) got 127 again with a different looking error:

/home/runner/work/_temp/99e3050c-5daa-4901-8d66-287dd3299a3f.sh: line 4: $'v2.3.0,\n body: words': command not found
Error: Process completed with exit code 127.

What's that \n doing in there? Anyway I think whatever's going on in there loses some ".

I feel like it really shouldn't be this complicated to send a JSON blob to an API call, so I assume I'm holding it wrong.

I'll poke this a bit longer before I cut bait and shop for a 3rd party Action to draft the release.

@solvaholic solvaholic temporarily deployed to uses-pat July 23, 2021 19:02 Inactive
@solvaholic solvaholic temporarily deployed to uses-pat July 23, 2021 19:05 Inactive
in release.yml, to assign step output to $_data.
@solvaholic
Copy link
Owner Author

OK, it was just the quotes.

Because the expression expands before bash gets a hold of it, wrap the expression in ' so bash'll treat it like one string:

          _data='${{ steps.get-data.outputs.data }}'

@solvaholic solvaholic merged commit e51df86 into main Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant