Skip to content

Commit 537a008

Browse files
k3llymarieeSunny Guduru
authored andcommitted
feat: create binaries in GitHub actions (#9)
* ci: add publish action to release-please workflow * feat: add required go-versions * remove unnecessary setup steps, go-versions
1 parent dcbe0d3 commit 537a008

2 files changed

Lines changed: 29 additions & 13 deletions

File tree

.github/actions/publish/action.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ inputs:
1515
runs:
1616
using: composite
1717
steps:
18-
- name: Set up QEMU
19-
uses: docker/setup-qemu-action@v3
20-
- name: Setup Docker Buildx
21-
uses: docker/setup-buildx-action@v3
18+
- name: Checkout
19+
uses: actions/checkout@v4
2220
with:
23-
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386
24-
- name: Git clean
25-
shell: bash
26-
run: git clean -f
27-
- name: Login to Docker
28-
shell: bash
29-
run: |
30-
echo $DOCKER_TOKEN | docker login --username $DOCKER_USERNAME --password-stdin
21+
fetch-depth: 0
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: stable
3126
- name: Run Goreleaser
3227
uses: goreleaser/goreleaser-action@v5
3328
with:

.github/workflows/release-please.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77

88
jobs:
9+
910
release-please:
1011
runs-on: ubuntu-latest
1112
outputs:
@@ -16,4 +17,24 @@ jobs:
1617
id: release
1718
with:
1819
token: ${{secrets.GITHUB_TOKEN}}
19-
release-type: "go"
20+
release-type: "go"
21+
22+
release-ldcli:
23+
permissions:
24+
id-token: write # Needed to obtain Docker tokens
25+
contents: write # Needed to upload release artifacts
26+
27+
needs: [ release-please ]
28+
# if: ${{ needs.release-please.outputs.release_created == 'true' }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- uses: ./.github/actions/publish
37+
with:
38+
dry-run: 'true'
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
tag: ${{ needs.release-please.outputs.tag_name }}

0 commit comments

Comments
 (0)