Skip to content

Commit a12f7ae

Browse files
committed
ci: switch from gitlab ci to github actions
1 parent 5d74b4a commit a12f7ae

2 files changed

Lines changed: 48 additions & 74 deletions

File tree

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '9.0.x'
20+
21+
- name: Publish self-contained
22+
run: dotnet publish src/ZehNuker.csproj -c Release -r win-x64 --self-contained true -o publish/self-contained
23+
24+
- name: Publish runtime-dependent
25+
run: dotnet publish src/ZehNuker.csproj -c Release -r win-x64 --self-contained false /p:PublishSingleFile=true /p:EnableCompressionInSingleFile=false -o publish/runtime
26+
27+
- name: Package zips
28+
run: |
29+
cd publish/self-contained && zip -r ../../ZehNuker-win-x64-self-contained.zip ZehNuker.exe && cd ../..
30+
cd publish/runtime && zip -r ../../ZehNuker-win-x64-runtime.zip ZehNuker.exe && cd ../..
31+
32+
- uses: actions/upload-artifact@v4
33+
with:
34+
name: ZehNuker-win-x64
35+
path: |
36+
ZehNuker-win-x64-self-contained.zip
37+
ZehNuker-win-x64-runtime.zip
38+
39+
- name: Create GitHub Release
40+
if: startsWith(github.ref, 'refs/tags/v')
41+
uses: softprops/action-gh-release@v2
42+
with:
43+
name: ZehNuker ${{ github.ref_name }}
44+
tag_name: ${{ github.ref_name }}
45+
generate_release_notes: true
46+
files: |
47+
ZehNuker-win-x64-self-contained.zip
48+
ZehNuker-win-x64-runtime.zip

.gitlab-ci.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)