Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Meta: Release via dispatch #14

Merged
merged 3 commits into from
Sep 16, 2020
Merged

Meta: Release via dispatch #14

merged 3 commits into from
Sep 16, 2020

Conversation

fregante
Copy link
Owner

Fixes fregante/daily-version-action#15

Considering that:

I moved the auto-changelog workflow to the workflow_dispatch method.

Copy link
Owner Author

@fregante fregante left a comment

Choose a reason for hiding this comment

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

I tested this whole workflow and it works correctly 🎉

https://github.com/fregante/daily-version-action/runs/1114007888?check_suite_focus=true
https://github.com/fregante/daily-version-action/releases/tag/v1.2.1

Notice:

  • v1.2.1 was created as requested
  • v1 was updated
  • The range link was wrong as expected (v1..v1.2.1 instead of v1.2.0..v1.2.1), but in my private tests it seemed correct, so it probably depends on the order of tags. It can be disabled later if it actually doesn't work.
  • exclude (Add exclude parameter #10) works correctly 🥳
  • Empty releases are correctly marked as Maintenance release

workflow_dispatch:
inputs:
Version:
description: 'Example: v1.2.3'
Copy link
Owner Author

Choose a reason for hiding this comment

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

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- uses: notlmn/release-with-changelog@v1
- run: git tag ${{ github.event.inputs.Version }}
Copy link
Owner Author

Choose a reason for hiding this comment

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

This creates the supplied tag

with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude: '^Meta'
- name: Update major tag
run: |
MAJOR=$(echo ${{ github.event.inputs.Version }} | sed 's/\..*//')
Copy link
Owner Author

Choose a reason for hiding this comment

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

sed drops everything after the first dot, turning v1.2.3 into v1

@fregante fregante added the documentation Improvements or additions to documentation label Sep 14, 2020
@fregante fregante marked this pull request as ready for review September 14, 2020 19:14
@notlmn
Copy link
Collaborator

notlmn commented Sep 15, 2020

The range link was wrong as expected (v1..v1.2.1 instead of v1.2.0..v1.2.1), but in my private tests it seemed correct, so it probably depends on the order of tags. It can be disabled later if it actually doesn't work.

This is why I removed running this action on itself, because we'd be constantly re-pushing tags.


Also we should change range from v1..v2 to v1...v2 (notice the extra dot), which also displays the list of commits, the former one doesn't, which only shows diff.

@notlmn notlmn mentioned this pull request Sep 16, 2020
@fregante fregante merged commit 17f28b5 into main Sep 16, 2020
@fregante fregante deleted the easy-releases branch September 16, 2020 18:03
@fregante
Copy link
Owner Author

Indeed that’s what’s happening. I was thinking we could just change the order of tags, but that doesn’t solve it. I’ll open another PR

Regarding the triple dot, I don’t think that changes the output log, it just changes the way diffs are computed (in some cases). GitHub only uses double dots

@notlmn
Copy link
Collaborator

notlmn commented Sep 18, 2020

Regarding the triple dot, I don’t think that changes the output log, it just changes the way diffs are computed (in some cases). GitHub only uses double dots

/compare/v2...v3 (3 dots) /compare/v2..v3 (2 dots)
image image

@fregante
Copy link
Owner Author

Ah yeah, I confused the 2. Let’s use the 3 dot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Meta: Simplify action updates
2 participants