Skip to content

Create a new release after a v*.*.* commit instead of the tag - #9470

Merged
nicolo-ribaudo merged 3 commits into
babel:masterfrom
nicolo-ribaudo:fix-release-action
Feb 15, 2019
Merged

nicolo-ribaudo merged 3 commits into
babel:masterfrom
nicolo-ribaudo:fix-release-action

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Feb 8, 2019 •

Copy link
Copy Markdown
Member
Q                       A
License MIT

The release action was never triggered because GitHub doesn't trigger the "push" event when tags are pushed. This PR changes the approach: the release is triggered when there is a v*.*.* commit, and it creates the tag.

Commits after "v0.0.8" in https://github.com/babel/test-github-actions/commits/master (private repo, sorry) test this PR.

@babel-bot

babel-bot commented Feb 8, 2019 •

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10027/

@babel-bot

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10010/

@nicolo-ribaudo

Copy link
Copy Markdown
Member Author

Thanks to the awesome https://github.com/nektos/act (suggested by Henry) I was able to actually test this action on a local copy of the repo.

I found some bugs, but now it works 🎉 https://github.com/nicolo-ribaudo/babel-clone/releases/tag/v7.3.3

Local output of the action
babel-clone on  master [!] via ⬢ v10.14.2 
➜ act                                                
[On master branch] git clone 'https://github.com/actions/bin' # ref=master
[Is version commit] docker build -t filter-commit-message:b6f698e /home/nicolo/Documenti/dev/babel-clone/.github/actions/filter-commit-message
[Is version commit] docker run image=filter-commit-message:b6f698e entrypoint=[] cmd=["^v(\\d+\\.)*\\d+(-\\S+)?$"]
INFO: v7.3.3 matches ^v(\d+\.)*\d+(-\S+)?$
[On master branch] docker build -t bin:master /tmp/act/actions/bin/filter@master/filter
[On master branch] docker run image=bin:master entrypoint=[] cmd=["branch" "master"]
refs/heads/master matches refs/heads/master
[Trigger GitHub release] docker build -t trigger-github-release:b6f698e /home/nicolo/Documenti/dev/babel-clone/.github/actions/trigger-github-release
[Trigger GitHub release] docker run image=trigger-github-release:b6f698e entrypoint=[] cmd=[]
+ echo INFO: Installing action dependencies...
INFO: Installing action dependencies...
+ cd /action
+ npm ci
added 188 packages in 3.713s
+ echo INFO: Checking out current commit...
INFO: Checking out current commit...
+ git -c advice.detachedHead=false checkout b6f698e01746ba22daa7e706dcdd7f591726858b
M	.github/actions/trigger-github-release/entrypoint.sh
HEAD is now at b6f698e01... v7.3.3
+ echo INFO: Getting release version...
INFO: Getting release version...
+ git log --oneline --format=%B -1 HEAD
+ current_tag=v7.3.3
+ echo INFO: Creating new tag...
INFO: Creating new tag...
+ git tag v7.3.3 b6f698e01746ba22daa7e706dcdd7f591726858b
fatal: tag 'v7.3.3' already exists
+ echo INFO: Tag already exists
INFO: Tag already exists
+ git describe --abbrev=0 --tags HEAD^
+ last_tag=v7.3.2
+ echo INFO: New version is v7.3.3; last version is v7.3.2.
INFO: New version is v7.3.3; last version is v7.3.2.
+ echo INFO: Generating the changelog...
INFO: Generating the changelog...
+ GITHUB_AUTH=9414ad2a1f6e250abd62133257e2f2da3e92843a node /action/node_modules/.bin/lerna-changelog --tag-from v7.3.2 --tag-to v7.3.3
+ changelog=
## v7.3.3 (2019-02-08)

#### :bug: Bug Fix
* `babel-parser`
  * [#9431](https://github.com/babel/babel/pull/9431) Typescript function destructured params ([@mhcgrq](https://github.com/mhcgrq))
  * [#9463](https://github.com/babel/babel/pull/9463) Fix range for TypeScript optional parameter in arrow function ([@existentialism](https://github.com/existentialism))

#### :nail_care: Polish
* `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`
  * [#9458](https://github.com/babel/babel/pull/9458) Fix duplicated assertThisInitialized calls in constructors ([@rubennorte](https://github.com/rubennorte))

#### Committers: 5
- Brian Ng ([@existentialism](https://github.com/existentialism))
- Downpooooour ([@mhcgrq](https://github.com/mhcgrq))
- Ilya Lesik ([@ilyalesik](https://github.com/ilyalesik))
- Rubén Norte ([@rubennorte](https://github.com/rubennorte))
- Yifei Fu ([@yifei-fu](https://github.com/yifei-fu))
+ echo INFO: Publishing the new GitHub release...
INFO: Publishing the new GitHub release...
+ node /action/release v7.3.3
+ echo 
## v7.3.3 (2019-02-08)

#### :bug: Bug Fix
* `babel-parser`
  * [#9431](https://github.com/babel/babel/pull/9431) Typescript function destructured params ([@mhcgrq](https://github.com/mhcgrq))
  * [#9463](https://github.com/babel/babel/pull/9463) Fix range for TypeScript optional parameter in arrow function ([@existentialism](https://github.com/existentialism))

#### :nail_care: Polish
* `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`
  * [#9458](https://github.com/babel/babel/pull/9458) Fix duplicated assertThisInitialized calls in constructors ([@rubennorte](https://github.com/rubennorte))

#### Committers: 5
- Brian Ng ([@existentialism](https://github.com/existentialism))
- Downpooooour ([@mhcgrq](https://github.com/mhcgrq))
- Ilya Lesik ([@ilyalesik](https://github.com/ilyalesik))
- Rubén Norte ([@rubennorte](https://github.com/rubennorte))
- Yifei Fu ([@yifei-fu](https://github.com/yifei-fu))
+ echo INFO: Done! Don't forget to thank new contributors :)
INFO: Done! Don't forget to thank new contributors :)

@nicolo-ribaudo
nicolo-ribaudo merged commit b25fea4 into babel:master Feb 15, 2019
@nicolo-ribaudo
nicolo-ribaudo deleted the fix-release-action branch February 15, 2019 20:42
@lock lock Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: publishing process outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants