diff options
author | Ilya Shipitsin <chipitsine@gmail.com> | 2023-12-12 00:28:52 +0100 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2024-03-03 15:32:50 -0600 |
commit | a2e4a3f367ade6dc7652e4630a7158b7e564c6f8 (patch) | |
tree | 35a90a9ca0ad19bc2e0eaa0e44e9bb6a15b8db62 /.github | |
parent | 5809029cb1fddf12726ab6aa557610234358e940 (diff) | |
download | portable-a2e4a3f367ade6dc7652e4630a7158b7e564c6f8.tar.gz portable-a2e4a3f367ade6dc7652e4630a7158b7e564c6f8.tar.bz2 portable-a2e4a3f367ade6dc7652e4630a7158b7e564c6f8.zip |
CI: automatically create release, upload windows builds
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/release_by_tag.yml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/release_by_tag.yml b/.github/workflows/release_by_tag.yml new file mode 100644 index 0000000..75b695e --- /dev/null +++ b/.github/workflows/release_by_tag.yml | |||
@@ -0,0 +1,66 @@ | |||
1 | |||
2 | on: | ||
3 | push: | ||
4 | tags: [ "v*" ] | ||
5 | |||
6 | permissions: write-all | ||
7 | |||
8 | jobs: | ||
9 | release: | ||
10 | runs-on: ubuntu-latest | ||
11 | outputs: | ||
12 | upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
13 | steps: | ||
14 | - id: create_release | ||
15 | uses: actions/create-release@v1 | ||
16 | env: | ||
17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
18 | with: | ||
19 | tag_name: ${{ github.ref }} | ||
20 | release_name: Release ${{ github.ref }} | ||
21 | draft: false | ||
22 | prerelease: false | ||
23 | |||
24 | build-windows: | ||
25 | needs: release | ||
26 | strategy: | ||
27 | matrix: | ||
28 | arch: [ Win32, x64, ARM64 ] | ||
29 | runs-on: windows-2022 | ||
30 | name: windows - ${{ matrix.arch }} | ||
31 | steps: | ||
32 | - uses: msys2/setup-msys2@v2 | ||
33 | with: | ||
34 | update: true | ||
35 | install: >- | ||
36 | autoconf | ||
37 | automake | ||
38 | diffutils | ||
39 | libtool | ||
40 | gcc | ||
41 | git | ||
42 | patch | ||
43 | perl | ||
44 | - uses: actions/checkout@main | ||
45 | - shell: msys2 {0} | ||
46 | run: ./autogen.sh | ||
47 | - shell: cmd | ||
48 | run: cmake -Bbuild -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=local | ||
49 | - shell: cmd | ||
50 | run: cmake --build build --config Release | ||
51 | - shell: cmd | ||
52 | run: cmake --install build --config Release | ||
53 | - shell: pwsh | ||
54 | run: | | ||
55 | Compress-Archive -Path local\* local.zip | ||
56 | |||
57 | - name: upload release | ||
58 | uses: actions/upload-release-asset@v1 | ||
59 | env: | ||
60 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
61 | with: | ||
62 | upload_url: ${{ needs.release.outputs.upload_url }} | ||
63 | asset_path: local.zip | ||
64 | asset_name: windows-${{ matrix.arch }}-${{ github.ref }} | ||
65 | asset_content_type: application/zip | ||
66 | |||