diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index a0c2754..fa6b72f 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -7,6 +7,9 @@ on: jobs: Compile: runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, arm64] steps: - uses: actions/checkout@v4 with: @@ -15,7 +18,7 @@ jobs: with: go-version: '1.18.0' # The Go version to download (if necessary) and use. - run: go generate cmd/ical-relay/main.go - - run: go build -o ./bin/ical-relay ./cmd/ical-relay/ + - run: env GOOS=linux GOARCH={{ matrix.arch }} go build -o ./bin/ical-relay ./cmd/ical-relay/ - uses: actions/upload-artifact@v3 with: name: ical-relay diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index d344602..a5a8541 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -48,6 +48,9 @@ jobs: Compile: runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, arm64] steps: - uses: actions/checkout@v4 with: @@ -56,15 +59,18 @@ jobs: with: go-version: '1.18.0' # The Go version to download (if necessary) and use. - run: go generate cmd/ical-relay/main.go - - run: go build -o ./bin/ical-relay ./cmd/ical-relay/ && strip ./bin/ical-relay + - run: env GOOS=linux GOARCH={{ matrix.arch }} go build -o ./bin/ical-relay ./cmd/ical-relay/ && strip ./bin/ical-relay - uses: actions/upload-artifact@v3 with: - name: ical-relay + name: ical-relay_{{ matrix.arch }} path: ./bin/ical-relay Package-deb: needs: Compile runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, arm64] steps: - name: Checkout Code uses: actions/checkout@v4 @@ -86,11 +92,11 @@ jobs: uses: actions/download-artifact@v3 id: download with: - name: ical-relay + name: ical-relay_{{ matrix.arch }} - run: | mkdir -p cmd/ical-relay/.debpkg/usr/bin cp ${{steps.download.outputs.download-path}}/ical-relay cmd/ical-relay/.debpkg/usr/bin/ - chmod +x cmd/ical-relay/.debpkg/usr/bin/ical-relay + chmod +x cmd/ical-relay/.debpkg/usr/bin/ical-relay_{{ matrix.arch }} - uses: jiro4989/build-deb-action@v2 id: package with: @@ -98,10 +104,10 @@ jobs: package_root: ./cmd/ical-relay/.debpkg maintainer: Julian Lemmerich version: ${{ github.ref }} # refs/tags/v*.*.* - arch: 'amd64' + arch: '{{ matrix.arch }}' desc: 'Relay ical urls and edit them on the fly with different modules.' - uses: actions/upload-artifact@v3 with: - name: ical-relay.deb + name: ical-relay_{{ matrix.arch }}.deb path: ${{steps.package.outputs.file_name}}