Merge pull request #49 from beclab/fix/add-apt-repository #144
Workflow file for this run
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: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22.4 | |
- name: Install x86_64 cross-compiler | |
run: sudo apt-get update && sudo apt-get install -y build-essential | |
- name: Install ARM cross-compiler | |
run: sudo apt-get update && sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v3.1.0 | |
with: | |
distribution: goreleaser | |
version: v1.18.2 | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload to S3 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: "us-east-1" | |
run: | | |
cd output && for file in *.tar.gz; do | |
aws s3 cp "$file" s3://terminus-os-install/$file --acl=public-read | |
done |