This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (82 loc) · 3.3 KB
/
Copy pathrelease.yml
File metadata and controls
98 lines (82 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Release
on:
push:
tags:
- 'v*.*.*' # Triggers on version tags like v1.0.0, v1.2.3, etc.
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Restore dependencies
run: dotnet restore
- name: Build and publish for Windows (x64)
run: |
dotnet publish src/DbDiff.Cli/DbDiff.Cli.csproj \
-c Release \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:Version=${{ steps.get_version.outputs.VERSION }} \
-o ./publish/win-x64
- name: Build and publish for Linux (x64)
run: |
dotnet publish src/DbDiff.Cli/DbDiff.Cli.csproj \
-c Release \
-r linux-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:Version=${{ steps.get_version.outputs.VERSION }} \
-o ./publish/linux-x64
- name: Build and publish for macOS (x64)
run: |
dotnet publish src/DbDiff.Cli/DbDiff.Cli.csproj \
-c Release \
-r osx-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:Version=${{ steps.get_version.outputs.VERSION }} \
-o ./publish/osx-x64
- name: Build and publish for macOS (ARM64)
run: |
dotnet publish src/DbDiff.Cli/DbDiff.Cli.csproj \
-c Release \
-r osx-arm64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:Version=${{ steps.get_version.outputs.VERSION }} \
-o ./publish/osx-arm64
- name: Create release archives
run: |
cd publish/win-x64 && zip -r ../../dbdiff-${{ steps.get_version.outputs.VERSION }}-win-x64.zip . && cd ../..
cd publish/linux-x64 && tar -czf ../../dbdiff-${{ steps.get_version.outputs.VERSION }}-linux-x64.tar.gz . && cd ../..
cd publish/osx-x64 && tar -czf ../../dbdiff-${{ steps.get_version.outputs.VERSION }}-osx-x64.tar.gz . && cd ../..
cd publish/osx-arm64 && tar -czf ../../dbdiff-${{ steps.get_version.outputs.VERSION }}-osx-arm64.tar.gz . && cd ../..
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dbdiff-*.zip
dbdiff-*.tar.gz
body: |
## DbDiff Release ${{ steps.get_version.outputs.VERSION }}
### Downloads
- **Windows (x64)**: `dbdiff-${{ steps.get_version.outputs.VERSION }}-win-x64.zip`
- **Linux (x64)**: `dbdiff-${{ steps.get_version.outputs.VERSION }}-linux-x64.tar.gz`
- **macOS (Intel)**: `dbdiff-${{ steps.get_version.outputs.VERSION }}-osx-x64.tar.gz`
- **macOS (Apple Silicon)**: `dbdiff-${{ steps.get_version.outputs.VERSION }}-osx-arm64.tar.gz`
### Changes
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for detailed changes.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}