2024-06-11 12:47:08 +02:00
|
|
|
name: Wireguard MFA Windows Agent build
|
|
|
|
run-name: ${{ gitea.actor }} is building a release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2024-06-11 20:46:54 +02:00
|
|
|
- "v[0-9]+"
|
2024-06-11 12:47:08 +02:00
|
|
|
- "build-[0-9]+"
|
|
|
|
|
|
|
|
jobs:
|
2024-06-11 14:18:39 +02:00
|
|
|
release:
|
2024-06-11 13:36:21 +02:00
|
|
|
runs-on: go-1.22
|
2024-06-11 12:47:08 +02:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
2024-06-11 13:51:04 +02:00
|
|
|
uses: actions/checkout@v4
|
2024-06-11 12:47:08 +02:00
|
|
|
with:
|
|
|
|
ssh-known-hosts: "[git.gibonuddevalla.se]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII2Od6HUfExymVv/wPJcWiA8mgsuMwEmF7UO+YjqnjWy"
|
|
|
|
ssh-strict: "false"
|
2024-06-11 20:02:40 +02:00
|
|
|
ssh-key: '${{secrets.CICD_SSH_KEY}}'
|
2024-06-11 12:47:08 +02:00
|
|
|
- name: Compile go binaries
|
2024-06-11 13:51:04 +02:00
|
|
|
env:
|
|
|
|
GOOS: 'windows'
|
2024-06-11 12:47:08 +02:00
|
|
|
run: go build -v
|
2024-06-11 20:43:45 +02:00
|
|
|
- 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}}'
|
2024-06-11 20:02:40 +02:00
|
|
|
- name: Distribute file on web
|
2024-06-11 20:35:35 +02:00
|
|
|
run: |
|
|
|
|
export SSH_KEY_FILE=$(mktemp)
|
|
|
|
echo '${{secrets.CICD_SSH_KEY}}' >$SSH_KEY_FILE
|
2024-06-11 20:43:45 +02:00
|
|
|
scp -i $SSH_KEY_FILE wireguard-mfa.exe filehosting:/var/www/git.gibonuddevalla.se/cicd/
|
2024-06-11 20:35:35 +02:00
|
|
|
rm -v $SSH_KEY_FILE
|