feat: Allow overriding temporary directory with $TMPDIR env var (#7) #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goreleaser | |
on: | |
pull_request: | |
push: | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
env: | |
flags: "" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Test | |
run: go test ./... | |
- name: Dependencies | |
run: | | |
sudo apt install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
mkdir /tmp/zlib | |
cd /tmp/zlib | |
wget https://www.zlib.net/current/zlib.tar.gz | |
tar xvf zlib.tar.gz | |
cd zlib-* | |
CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar CHOST=arm64 ./configure --static | |
make | |
sudo make install | |
- name: Is snapshot? | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: echo "flags=--snapshot" >> $GITHUB_ENV | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --clean ${{ env.flags }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: snapshot | |
path: dist/* |