diff --git a/.github/workflows/publish_bin.yml b/.github/workflows/publish_bin.yml new file mode 100644 index 0000000..78d7eb6 --- /dev/null +++ b/.github/workflows/publish_bin.yml @@ -0,0 +1,27 @@ +name: Build and Publish Binaries + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + - run: go generate ./cmd/stash-vr/ + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish_docker.yml similarity index 69% rename from .github/workflows/publish.yml rename to .github/workflows/publish_docker.yml index 5b7c8fe..18130ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish_docker.yml @@ -1,4 +1,4 @@ -name: Publish Builds +name: Build and Publish Docker Images on: workflow_dispatch: @@ -10,7 +10,7 @@ on: jobs: push_to_registry: - name: Push to Docker Hub + name: Docker Hub runs-on: ubuntu-latest steps: - name: Checkout @@ -49,22 +49,4 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - - run: go generate ./cmd/stash-vr/ - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - distribution: goreleaser - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index dd0f464..6965c8e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -5,15 +5,16 @@ builds: - -X stash-vr/internal/build.Version={{.Version}} -X stash-vr/internal/build.SHA={{.Commit}} env: - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 + targets: + - linux_amd64 + - linux_arm64 + - windows_amd64 + - darwin_amd64 + - darwin_arm64 archives: - format: tar.gz format_overrides: - goos: windows - format: zip \ No newline at end of file + format: zip +release: + mode: append \ No newline at end of file