Skip to content

Commit

Permalink
feat: create binaries in GitHub actions (#9)
Browse files Browse the repository at this point in the history
* ci: add publish action to release-please workflow

* feat: add required go-versions

* remove unnecessary setup steps, go-versions
  • Loading branch information
k3llymariee authored Mar 12, 2024
1 parent 0e2ec3b commit 9528f8d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
19 changes: 7 additions & 12 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ inputs:
runs:
using: composite
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout
uses: actions/checkout@v4
with:
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386
- name: Git clean
shell: bash
run: git clean -f
- name: Login to Docker
shell: bash
run: |
echo $DOCKER_TOKEN | docker login --username $DOCKER_USERNAME --password-stdin
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main

jobs:

release-please:
runs-on: ubuntu-latest
outputs:
Expand All @@ -16,4 +17,24 @@ jobs:
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
release-type: "go"
release-type: "go"

release-ldcli:
permissions:
id-token: write # Needed to obtain Docker tokens
contents: write # Needed to upload release artifacts

needs: [ release-please ]
# if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/publish
with:
dry-run: 'true'
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.release-please.outputs.tag_name }}

0 comments on commit 9528f8d

Please sign in to comment.