diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml new file mode 100644 index 0000000..4454572 --- /dev/null +++ b/.github/workflows/pr-build.yaml @@ -0,0 +1,50 @@ +name: PR Build + +on: + pull_request: + branches: + - main + +jobs: + snapshot: + name: Build Snapshot Packages + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Run GoReleaser Snapshot + uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + args: release --snapshot --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Debian Packages + uses: actions/upload-artifact@v4 + with: + name: debian-packages + path: dist/*.deb + retention-days: 30 + + - name: Upload RPM Packages + uses: actions/upload-artifact@v4 + with: + name: rpm-packages + path: dist/*.rpm + retention-days: 30 + + - name: Upload Archives + uses: actions/upload-artifact@v4 + with: + name: archives + path: dist/*.tar.gz + retention-days: 30 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 47be0ba..84b247f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -50,3 +50,17 @@ brews: bin.install "env-exec" test: | system "echo Sorry, no test yet" + +nfpms: + - id: env-exec + package_name: env-exec + + formats: + - deb + - rpm + + vendor: polarn.net + homepage: "https://github.com/polarn/env-exec" + maintainer: Marcus Johansson + description: "A tool to inject environment variables from various sources (GCP Secrets Manager, GitLab) before executing commands" + license: Apache-2.0