Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*.*.*' # Trigger on new tags matching X.Y.Z
- "*.*.*" # Trigger on new tags matching X.Y.Z

permissions:
contents: write
Expand All @@ -21,14 +21,15 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: "1.24"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
version: "~> v2"
args: release --clean
env:
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
APT_WEBDAV_PASSWORD: ${{ secrets.APT_WEBDAV_PASSWORD }}
27 changes: 19 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before:
- go mod tidy

builds:
- id: env-exec
- id: env-exec-binary
binary: env-exec
main: ./cmd/env-exec/main.go
env:
Expand Down Expand Up @@ -37,22 +37,18 @@ aurs:
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://aur@aur.archlinux.org/env-exec-bin.git"

brews:
homebrew_casks:
- name: env-exec
repository:
owner: polarn
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula
directory: Casks
homepage: "https://github.com/polarn/env-exec"
description: "The Environment variable executor"
install: |
bin.install "env-exec"
test: |
system "echo Sorry, no test yet"

nfpms:
- id: env-exec
- id: env-exec-packages
package_name: env-exec

formats:
Expand All @@ -64,3 +60,18 @@ nfpms:
maintainer: Marcus Johansson <polarn@polarn.net>
description: "A tool to inject environment variables from various sources (GCP Secrets Manager, GitLab) before executing commands"
license: Apache-2.0

publishers:
- name: apt-repo-webdav
ids:
- env-exec-packages
cmd: |
if [[ "{{ .ArtifactPath }}" == *.deb ]]; then
curl -T {{ .ArtifactPath }} \
-u apt:{{ .Env.APT_WEBDAV_PASSWORD }} \
https://webdav.polarn.net/apt/$(basename {{ .ArtifactPath }})
else
echo "Skipping non-deb file: {{ .ArtifactPath }}"
fi
env:
- APT_WEBDAV_PASSWORD