Skip to content

Commit 2682022

Browse files
committed
Add modify release
1 parent 2fa0a18 commit 2682022

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Release
22
on:
3-
workflow_dispatch:
4-
inputs:
5-
tag:
6-
description: "The tag name to run this against"
7-
required: true
8-
type: string
3+
release:
4+
types: [published]
95

106
jobs:
117
deploy:
@@ -18,7 +14,7 @@ jobs:
1814
id: exec_deploy
1915
uses: jtrim777-dev/bazeldist-action@main
2016
with:
21-
tag: ${{ inputs.tag }}
17+
tag: ${{ github.event.release.tag_name }}
2218
version_file: "VERSION"
2319
version_sub_files: package/man/lsusb.man
2420
bazel_targets: "//:deploy-pkg,//:deploy-formula"
@@ -36,3 +32,25 @@ jobs:
3632
pull: 'NO-PULL'
3733
push: true
3834
tag: 'v${{ steps.exec_deploy.outputs.version }} --force'
35+
modify_release:
36+
name: Update GitHub Release Info
37+
environment: release
38+
runs-on: ubuntu-latest
39+
if: ${{ github.event.release.prerelease }} != true
40+
needs: deploy
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Get Previous Tag
44+
id: get_tags
45+
run: |
46+
git fetch -a
47+
echo ::set-output name=current_tag::$(git tag --sort "-committerdate" | sed '/-/d' | sed -n 1p)
48+
echo ::set-output name=version::$(git tag --sort "-committerdate" | sed '/-/d' | sed -n 1p | sed 's/v//')
49+
echo ::set-output name=previous_tag::$(git tag --sort "-committerdate" | sed '/-/d' | sed -n 2p)
50+
- uses: irongut/EditRelease@v1.2.0
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
id: ${{ github.event.release.id }}
54+
body: |
55+
**Full Changelog:** [${{ steps.get_tags.outputs.previous_tag }}...${{ steps.get_tags.outputs.current_tag }}](https://github.com/jtrim777-dev/lsusb/compare/${{ steps.get_tags.outputs.previous_tag }}...${{ steps.get_tags.outputs.current_tag }})
56+
Artifacts Published to [Jtrim777 Artifact Repository](https://maven.jtrim777.dev/#/releases/dev/jtrim777/lsusb/${{ steps.get_tags.outputs.version }})

package/man/lsusb.man

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" Manpage for lsusb.
2-
.TH man 1 "23 September 2022" "0.1.0" "lsusb manpage"
2+
.TH man 1 "23 September 2022" "0.1.2" "lsusb manpage"
33
.SH NAME
44
lsusb \- print data about attached USB devices
55
.SH SYNOPSIS

0 commit comments

Comments
 (0)