Skip to content

Commit dfb257e

Browse files
authored
Add release plugin workflow (#6191)
* Add release plugin workflow Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> * Add publish binary step Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> * Update get version command Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> * Update workflow Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> * Remove unused code Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> * Add flag to release step Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> --------- Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com> Signed-off-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com>
1 parent 8a9bac1 commit dfb257e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/plugin_release.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
go-version: ${{ env.GO_VERSION }}
2828
cache: true
2929
- name: Determine Plugin Info
30-
run: echo "PLUGIN_NAME=$(basename $INPUT_PATH)" >> $GITHUB_ENV
30+
run: echo "PLUGIN_NAME=$(basename ${{ inputs.path }})" >> $GITHUB_ENV
3131
- name: Build binary artifacts
3232
run: |
3333
make build/plugin PLUGINS=$PLUGIN_NAME BUILD_OS=linux BUILD_ARCH=amd64 BIN_SUFFIX=_${{ inputs.version }}_linux_amd64
@@ -58,12 +58,15 @@ jobs:
5858
5959
EOF
6060
git log --reverse --format="* %s" $LATEST_VERSION..HEAD -- $INPUT_PATH | sed -E 's/\(#([0-9]+)\)/([#\1](https:\/\/github.com\/pipe-cd\/pipecd\/pull\/\1))/g' >> output.tmp
61-
62-
gh release create --draft --target "$(git rev-parse HEAD)" --title "$PLUGIN_NAME $INPUT_VERSION" --notes-file output.tmp $INPUT_PATH/$INPUT_VERSION
6361
- name: Publish binary artifacts
6462
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda #v2.2.1
6563
with:
6664
tag_name: ${{ inputs.path }}/${{ inputs.version }}
65+
body_path: output.tmp
66+
name: ${{ env.PLUGIN_NAME }} ${{ inputs.version }}
67+
target_commitish: ${{ github.sha }}
68+
draft: true
69+
make_latest: "false"
6770
files: |
6871
./.artifacts/plugins/${{ env.PLUGIN_NAME }}_${{ inputs.version }}_linux_amd64
6972
./.artifacts/plugins/${{ env.PLUGIN_NAME }}_${{ inputs.version }}_linux_arm64

0 commit comments

Comments
 (0)