-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(binary): added the binary release feature for GoLang pipelines
Signed-off-by: Felipe Rios <[email protected]>
- Loading branch information
1 parent
ffabc22
commit 0ceeaa9
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
on: | ||
workflow_call: | ||
|
||
inputs: | ||
binary_name: | ||
description: 'Binary name to be used as default source' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
env: | ||
PACKAGE_NAME: '${{ inputs.binary_name }}-${{ github.ref[10:] }}' | ||
DEBIAN_FRONTEND: 'noninteractive' | ||
steps: | ||
# TODO: it should be finished with: "https://github.com/rios0rios0/autobump/blob/main/.github/workflows/release.yml#L68" | ||
- run: | | ||
make build | ||
strip -s bin/${{ inputs.binary_name }} | ||
shell: 'bash' | ||
- run: | | ||
cd bin | ||
zip -9 ${{ env.PACKAGE_NAME }}.zip ${{ inputs.binary_name }} | ||
shell: 'bash' | ||
- uses: 'actions/upload-artifact@v2' | ||
with: | ||
name: '${{ inputs.binary_name }}' | ||
path: 'bin/${{ env.PACKAGE_NAME }}.zip' | ||
- uses: 'actions/download-artifact@v2' | ||
with: | ||
name: '${{ inputs.binary_name }}' | ||
- uses: 'actions/upload-release-asset@v1' | ||
# TODO: is this really necessary? | ||
#env: | ||
# GITHUB_TOKEN: '${{ github.token }}' | ||
with: | ||
upload_url: '${{ steps.create_release.outputs.upload_url }}' | ||
asset_path: '${{ env.PACKAGE_NAME }}.zip' | ||
asset_name: '${{ env.PACKAGE_NAME }}.zip' | ||
asset_content_type: 'application/zip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters