Skip to content

Update README

Update README #18

Workflow file for this run

name: Build and release
on:
- push
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: ['amd64', '386', 'arm64']
steps:
- uses: actions/checkout@v4
- name: Git Version
id: version
uses: codacy/[email protected]
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'linux/go.mod'
cache-dependency-path: 'linux/go.sum'
- name: Build linux
run: GOARCH=${{ matrix.arch }} go build -C linux -o ../out/autobrowser cmd/autobrowser/main.go
- name: Install nFPM
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
- name: Build artifacts
run: |
export GOARCH=${{ matrix.arch }}
export VERSION=${{ steps.version.outputs.version }}
nfpm package -p rpm --target out/ -f linux/build/nfpm.yaml
nfpm package -p deb --target out/ -f linux/build/nfpm.yaml
nfpm package -p apk --target out/ -f linux/build/nfpm.yaml
nfpm package -p archlinux --target out/ -f linux/build/nfpm.yaml
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-artifacts-${{ matrix.arch }}
path: |
out/*.deb
out/*.rpm
out/*.apk
out/*.zst
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'macos/go.mod'
cache-dependency-path: 'macos/go.sum'
- name: Build macos
run: make build-macos
- name: Build artifacts
run: cp out/Autobrowser.App/autobrowser out/autobrowser-mac-bin
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mac-artifacts
path: |
out/autobrowser-mac-bin
release:
if: github.ref == 'refs/heads/master'
needs: [build-linux, build-mac]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
- name: Git Version
id: version
uses: codacy/[email protected]
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: out
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: "${{ steps.version.outputs.version }}"
files: out/*