aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/release.yml81
1 files changed, 81 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..8230b82
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,81 @@
1# GitHub Actions workflow to create releases from tags.
2name: "Release"
3
4on:
5 push:
6 tags: [ "v*" ]
7
8permissions:
9 contents: write
10
11jobs:
12 release:
13 name: "Release"
14 runs-on: "ubuntu-latest"
15 outputs:
16 upload_url: "${{ steps.create_release.outputs.upload_url }}"
17 steps:
18 - name: "Checkout repository"
19 uses: actions/checkout@v4
20
21 - name: "Generate version changelog"
22 run: .github/scripts/changelog.sh "$VERSION" > release-changelog.txt
23 env:
24 VERSION: "${{ github.ref_name }}"
25
26 - name: "Create GitHub release"
27 id: create_release
28 uses: softprops/action-gh-release@v1
29 with:
30 body_path: "${{ github.workspace }}/release-changelog.txt"
31
32 build-windows:
33 name: "${{ matrix.os }}/${{ matrix.arch }}"
34 runs-on: "${{ matrix.os }}"
35 needs: ["release"]
36 strategy:
37 matrix:
38 os: [ "windows-2022" ]
39 arch: [ "Win32", "x64", "ARM64" ]
40 steps:
41 - name: "Checkout repository"
42 uses: actions/checkout@v4
43
44 - name: "Setup MSYS2"
45 uses: msys2/setup-msys2@v2
46 with:
47 update: true
48 install: >-
49 autoconf
50 automake
51 diffutils
52 libtool
53 gcc
54 git
55 patch
56 perl
57
58 - shell: msys2 {0}
59 run: ./autogen.sh
60
61 - shell: cmd
62 run: cmake -Bbuild -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=local
63
64 - shell: cmd
65 run: cmake --build build --config Release
66
67 - shell: cmd
68 run: cmake --install build --config Release
69
70 - shell: pwsh
71 run: Compress-Archive -Path local\* local.zip
72
73 - name: "Upload release artifact"
74 uses: actions/upload-release-asset@v1
75 env:
76 GITHUB_TOKEN: "${{ github.token }}"
77 with:
78 upload_url: "${{ needs.release.outputs.upload_url }}"
79 asset_path: "local.zip"
80 asset_name: "libressl_${{ github.ref_name }}_windows_${{ matrix.arch }}.zip"
81 asset_content_type: "application/zip"