File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Inspired by:
2
+ # https://github.com/mikefarah/yq/blob/master/.github/workflows/release.yml
3
+
4
+ name : Release F#
5
+
6
+ on :
7
+ push :
8
+ tags :
9
+ - ' *'
10
+
11
+ # Kill other jobs when we trigger this workflow by sending new commits
12
+ # to the PR.
13
+ # https://stackoverflow.com/a/72408109
14
+ concurrency :
15
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16
+ cancel-in-progress : true
17
+
18
+ jobs :
19
+ publish :
20
+ name : Update workflow dispatch tags
21
+ runs-on : ubuntu-22.04
22
+ steps :
23
+ - name : Checkout repo
24
+ uses : actions/checkout@v4
25
+ - name : Setup .NET
26
+ uses : actions/setup-dotnet@v4
27
+ with :
28
+ dotnet-version : ' 8.x'
29
+ - name : Install dependencies
30
+ working-directory : ./src/
31
+ run : dotnet restore
32
+ - name : Build
33
+ working-directory : ./src/
34
+ run : dotnet build --configuration Release --no-restore
35
+ - name : Publish
36
+ working-directory : ./src/
37
+ # https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained
38
+ run : dotnet publish -c Release -o out/ -r linux-x64 --self-contained true --no-restore
39
+ - name : Compress published program
40
+ working-directory : ./src/
41
+ run : tar -czvf fsharp-program.tar.gz out/
42
+ - name : Release
43
+ uses : softprops/action-gh-release@v2
44
+ with :
45
+ files : ./src/fsharp-program.tar.gz
46
+ fail_on_unmatched_files : true
47
+
48
+
You can’t perform that action at this time.
0 commit comments