Part of https://plan.wireit.in/deepstack/browse/VUL-265/ Reviewed-on: #1 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
env:
|
|
TERM: dumb
|
|
|
|
jobs:
|
|
build-and-release:
|
|
name: Build and Upload Release Assets
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ^1.21
|
|
id: go
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build Linux AMD64 binary
|
|
run: make cross
|
|
|
|
- name: Check binary permissions
|
|
run: |
|
|
cd bin
|
|
ls -la kompose-linux-amd64
|
|
|
|
- name: Get the version
|
|
id: vars
|
|
run: |
|
|
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
|
|
|
- name: Upload binary to release assets
|
|
uses: https://gitea.com/cerc-io/action-gh-release@gitea-v2
|
|
with:
|
|
files: ./bin/kompose-linux-amd64
|
|
token: ${{ secrets.CICD_PUBLISH_TOKEN }}
|
|
|
|
- name: Publish binary as generic package
|
|
run: |
|
|
curl --user "${{ github.repository_owner }}:${{ secrets.CICD_PUBLISH_TOKEN }}" \
|
|
--upload-file ./bin/kompose-linux-amd64 \
|
|
"https://git.vdb.to/api/packages/${{ github.repository_owner }}/generic/kompose/${{ steps.vars.outputs.tag }}/kompose-linux-amd64"
|