Skip to content

Commit

Permalink
[3640169] New Docker Trigger Action release
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch1009 committed Sep 9, 2024
1 parent 3640169 commit 4fd6e6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
PREVIOUS_TAG=$(git describe --tags --always --abbrev=0 HEAD^)
PR_LOG=$(gh pr list --search "is:merged merged:>$(git log -1 --format=%aI $PREVIOUS_TAG)" --json title,author --jq '.[] | " \n - [x] " + .title + " by @" + .author.login' | tr '\n' ', ')
echo "PR_LOG<<EOF" >> $GITHUB_ENV
echo "$PR_LOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "pr-log=$PR_LOG" >> $GITHUB_OUTPUT
# extract all commit logs from the last tag
git log --pretty=format:"%s" $PREVIOUS_TAG..HEAD
# format the commit logs
git log --pretty=format:"%s" $PREVIOUS_TAG..HEAD | sed 's/^/- /g'
echo "commit_log"=$(git log --pretty=format:"%s" $PREVIOUS_TAG..HEAD | sed 's/^/- /g') >> $GITHUB_OUTPUT
echo "pr-log=$(gh pr list --search "is:merged merged:>$(git log -1 --format=%aI $(git describe --tags --always --abbrev=0 HEAD^))" --json title,author --jq '.[] | " \n - [x] " + .title + " by @" + .author.login' | tr '\n' ', ')" >> $GITHUB_OUTPUT
create-new-release:
name: Create New Release 🎉
Expand Down Expand Up @@ -68,12 +57,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
gh release create v${{ needs.build-docker-image.outputs.release_version }} \
--title "v${{ needs.build-docker-image.outputs.release_version }}" \
gh release create v$(jq -r ".version" package.json) \
--title "v$(jq -r ".version" package.json)" \
--notes "## 🎍 What's new in this release:
${{ needs.build-docker-image.outputs.commit_log }}
- [x] New Docker Image Release $(jq -r ".version" package.json )
## 🙏🏾 Thank You:
A big thank you to all our amazing engineers and maintainers
Expand Down
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.0.10](https://github.com/mitch1009/docker-trigger/compare/v1.0.6...v1.0.10) (2024-09-09)

### 1.0.1 (2024-09-07)


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mitch1009/docker-trigger",
"version": "1.0.10",
"version": "1.0.9",
"description": "docker trigger action",
"main": "index.js",
"scripts": {
Expand All @@ -14,4 +14,4 @@
"dependencies": {
"standard-version": "^9.5.0"
}
}
}

0 comments on commit 4fd6e6c

Please sign in to comment.