2024-10-02 14:44:51 +08:00
|
|
|
name: Windows CI
|
2024-11-06 09:53:05 +08:00
|
|
|
on:
|
|
|
|
push:
|
2024-11-06 10:01:18 +08:00
|
|
|
branches:
|
|
|
|
- '**'
|
2024-11-06 09:53:05 +08:00
|
|
|
tags-ignore:
|
2024-11-06 09:58:45 +08:00
|
|
|
- 'v*'
|
2024-11-21 10:54:22 +08:00
|
|
|
paths:
|
|
|
|
- '**.cpp'
|
|
|
|
- '**.h'
|
|
|
|
- '**.conf'
|
2024-10-02 14:44:51 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: [windows11]
|
|
|
|
steps:
|
2024-10-16 01:24:36 +08:00
|
|
|
- name: Clone repository
|
|
|
|
run: |
|
2024-11-06 00:02:58 +08:00
|
|
|
$ref = "${{ github.ref }}"
|
|
|
|
if ($ref -like 'refs/heads/*') {
|
|
|
|
$branch = $ref -replace '^refs/heads/', ''
|
|
|
|
} elseif ($ref -like 'refs/tags/*') {
|
|
|
|
$branch = $ref -replace '^refs/tags/', ''
|
|
|
|
} else {
|
|
|
|
$branch = $ref
|
|
|
|
}
|
2024-10-16 01:32:28 +08:00
|
|
|
git clone --depth 1 --branch=$branch https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@amass.fun/gitea/${{ gitea.repository }}.git .
|
2024-10-16 01:24:36 +08:00
|
|
|
git checkout ${{ github.sha }}
|
2024-10-02 14:47:10 +08:00
|
|
|
- name: Build and deploy
|
2024-10-02 14:44:51 +08:00
|
|
|
run: |
|
|
|
|
resources/build.ps1 build
|
|
|
|
resources/build.ps1 deploy
|
2024-11-06 00:02:58 +08:00
|
|
|
resources/build.ps1 changelog
|
|
|
|
- name: Upload Gitea Release
|
|
|
|
uses: akkuman/gitea-release-action@v1
|
|
|
|
with:
|
|
|
|
body_path: build/CHANGELOG.txt
|
|
|
|
files: |-
|
2024-11-21 21:39:49 +08:00
|
|
|
build/掌静脉工具v*.zip
|