diff --git a/.github/workflows/aur.yaml b/.github/workflows/aur.yaml new file mode 100644 index 0000000..d64274e --- /dev/null +++ b/.github/workflows/aur.yaml @@ -0,0 +1,22 @@ +name: Publish to AUR +on: + push: + branches: + - master + paths: + - PKGBUILD +jobs: + aur-publish: + if: github.repository_owner == 'tfkhdyt' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: KSXGitHub/github-actions-deploy-aur@v2.7.1 + with: + pkgname: urban-cli-bin + pkgbuild: ./PKGBUILD + commit_username: ${{ secrets.AUR_USERNAME }} + commit_email: ${{ secrets.AUR_EMAIL }} + ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + commit_message: Update AUR package + ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..e540004 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Release Go binary +on: + release: + types: [created] +permissions: + contents: write + packages: write +jobs: + release-matrix: + runs-on: ubuntu-latest + strategy: + matrix: + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + exclude: + - goarch: arm64 + goos: windows + steps: + - uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + ldflags: '-w -s' + executable_compression: upx + md5sum: FALSE + sha256sum: TRUE