diff options
| author | Ilya Shipitsin <chipitsine@gmail.com> | 2023-12-12 00:28:52 +0100 |
|---|---|---|
| committer | Ilya Shipitsin <chipitsine@gmail.com> | 2023-12-12 00:28:52 +0100 |
| commit | a553514cd9270ae90b27dffb7481cd459905d787 (patch) | |
| tree | d21c48c626175771ff5811ffc8848494c47c342d /.github/workflows | |
| parent | 2e88c74329938b5af441736645e795289660aa38 (diff) | |
| download | portable-a553514cd9270ae90b27dffb7481cd459905d787.tar.gz portable-a553514cd9270ae90b27dffb7481cd459905d787.tar.bz2 portable-a553514cd9270ae90b27dffb7481cd459905d787.zip | |
CI: automatically create release, upload windows builds
Diffstat (limited to '.github/workflows')
| -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 | |||
