Magnus Åhall
a8be328a6d
Some checks failed
Wireguard MFA Windows Agent build / release (push) Failing after 15s
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Wireguard MFA Windows Agent build
|
|
run-name: ${{ gitea.actor }} is building a release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+"
|
|
- "build-[0-9]+"
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: go-1.22
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ssh-known-hosts: "[git.gibonuddevalla.se]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII2Od6HUfExymVv/wPJcWiA8mgsuMwEmF7UO+YjqnjWy"
|
|
ssh-strict: "false"
|
|
ssh-key: '${{secrets.CICD_SSH_KEY}}'
|
|
- name: Compile go binaries
|
|
env:
|
|
GOOS: 'windows'
|
|
GOARCH: 'amd64'
|
|
run: go build -v -ldflags -H=windowsgui
|
|
- name: Create release
|
|
id: use-go-action
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: |-
|
|
wireguard-mfa.exe
|
|
api_key: '${{secrets.CICD_API_TOKEN}}'
|
|
- name: Distribute file on web
|
|
run: |
|
|
export SSH_KEY_FILE=$(mktemp)
|
|
echo '${{secrets.CICD_SSH_KEY}}' >$SSH_KEY_FILE
|
|
scp -i $SSH_KEY_FILE wireguard-mfa.exe "filehosting:/var/www/git.gibonuddevalla.se/cicd/wireguard-mfa_${{gitea.sha}}.exe"
|
|
rm -v $SSH_KEY_FILE
|