2023-08-03 01:47:26 +02:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
|
|
|
|
2023-12-26 20:49:47 +01:00
|
|
|
env:
|
|
|
|
GO_VERSION: '1.20'
|
|
|
|
|
2023-08-03 01:47:26 +02:00
|
|
|
jobs:
|
2023-12-26 21:49:48 +01:00
|
|
|
merge_release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Merge development -> staging
|
|
|
|
uses: devmasx/merge-branch@master
|
|
|
|
with:
|
|
|
|
type: now
|
|
|
|
from_branch: main
|
|
|
|
target_branch: release
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-12-23 14:03:38 +01:00
|
|
|
build_linux:
|
2023-08-03 01:47:26 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2023-12-26 20:49:47 +01:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2023-08-03 01:47:26 +02:00
|
|
|
- name: Install libfido2-dev
|
|
|
|
run: sudo apt-get install -y libfido2-dev
|
2023-12-26 20:49:47 +01:00
|
|
|
- name: Build
|
2023-09-20 00:41:43 +02:00
|
|
|
run: go build -o goldwarden_linux_x86_64 -v .
|
2023-08-21 20:02:08 +02:00
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
|
|
|
with:
|
2023-12-26 20:49:47 +01:00
|
|
|
files: './goldwarden_linux_x86_64'
|
2023-08-21 20:02:08 +02:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-08-21 00:47:40 +02:00
|
|
|
- name: Validate ArchLinux PKGBUILD
|
2023-08-21 00:38:11 +02:00
|
|
|
uses: hapakaien/archlinux-package-action@v2
|
|
|
|
with:
|
|
|
|
flags: ''
|
|
|
|
namcap: true
|
2023-08-22 10:31:42 +02:00
|
|
|
updpkgsums: true
|
2023-08-21 01:03:21 +02:00
|
|
|
- name: Publish AUR package
|
2023-08-21 01:19:42 +02:00
|
|
|
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
|
2023-08-21 00:47:40 +02:00
|
|
|
with:
|
2023-08-21 01:03:21 +02:00
|
|
|
pkgname: goldwarden
|
2023-08-22 10:31:42 +02:00
|
|
|
updpkgsums: true
|
2023-08-21 01:03:21 +02:00
|
|
|
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 from GitHub Actions automation
|
|
|
|
ssh_keyscan_types: ed25519
|
2023-09-20 00:41:43 +02:00
|
|
|
- name: Move binaries to directories
|
|
|
|
run: |
|
2023-09-20 03:06:09 +02:00
|
|
|
mkdir -p .debpkg/usr/bin
|
2023-09-20 00:41:43 +02:00
|
|
|
mkdir -p .rpmpkg/usr/bin
|
|
|
|
cp -p goldwarden_linux_x86_64 .debpkg/usr/bin/goldwarden
|
|
|
|
cp -p goldwarden_linux_x86_64 .rpmpkg/usr/bin/goldwarden
|
2023-09-20 03:06:09 +02:00
|
|
|
mkdir -p .debpkg/usr/share/polkit-1/actions/
|
|
|
|
mkdir -p .rpmpkg/usr/share/polkit-1/actions/
|
|
|
|
cp -p resources/com.quexten.goldwarden.policy .debpkg/usr/share/polkit-1/actions/
|
|
|
|
cp -p resources/com.quexten.goldwarden.policy .rpmpkg/usr/share/polkit-1/actions/
|
2023-09-20 00:41:43 +02:00
|
|
|
- uses: jiro4989/build-deb-action@v3
|
|
|
|
with:
|
|
|
|
package: goldwarden
|
|
|
|
package_root: .debpkg
|
|
|
|
maintainer: quexten
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
arch: 'amd64'
|
|
|
|
desc: 'Goldwarden'
|
2023-09-20 00:58:06 +02:00
|
|
|
- uses: AButler/upload-release-assets@v3.0
|
2023-09-20 00:41:43 +02:00
|
|
|
with:
|
|
|
|
files: './*.deb'
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: jiro4989/build-rpm-action@v2
|
|
|
|
with:
|
|
|
|
summary: 'Goldwarden'
|
|
|
|
package: goldwarden
|
|
|
|
package_root: .rpmpkg
|
|
|
|
maintainer: quexten
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
arch: 'x86_64'
|
|
|
|
desc: 'Goldwarden'
|
2023-09-20 00:58:06 +02:00
|
|
|
- name: Move binaries to directories
|
|
|
|
run:
|
|
|
|
"rm ./goldwarden-debuginfo*"
|
2023-09-20 00:41:43 +02:00
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
|
|
|
with:
|
|
|
|
files: './*.rpm'
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-12-26 20:49:47 +01:00
|
|
|
build_linux_arm64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Build
|
|
|
|
run: GOARCH=arm64 go build -tags nofido2 -o goldwarden_linux_arm64 -v .
|
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
|
|
|
with:
|
|
|
|
files: './goldwarden_linux_arm64'
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
build_linux_x86:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Build
|
|
|
|
run: GOARCH=386 go build -tags nofido2 -o goldwarden_linux_x86 -v .
|
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
|
|
|
with:
|
|
|
|
files: './goldwarden_linux_x86'
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2023-09-19 23:47:58 +02:00
|
|
|
build_macos_x86_64:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Build
|
2023-12-23 14:03:38 +01:00
|
|
|
run: go build -tags "nofido2" -o "goldwarden_macos_x86_64" -v .
|
2023-09-20 00:41:43 +02:00
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
2023-09-19 23:47:58 +02:00
|
|
|
with:
|
2023-09-20 00:58:06 +02:00
|
|
|
files: './goldwarden_macos_x86_64'
|
2023-09-20 00:41:43 +02:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-08-21 00:47:40 +02:00
|
|
|
|
2023-09-19 23:47:58 +02:00
|
|
|
build_windows_x86_64:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Build
|
2023-12-23 14:03:38 +01:00
|
|
|
run: go build -tags "nofido2" -o "goldwarden_windows_x86_64.exe" -v .
|
2023-09-20 00:41:43 +02:00
|
|
|
- uses: AButler/upload-release-assets@v2.0
|
2023-09-19 23:47:58 +02:00
|
|
|
with:
|
2023-09-20 00:41:43 +02:00
|
|
|
files: './goldwarden_windows_x86_64.exe'
|
2023-12-23 14:03:38 +01:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|