Skip to content

Commit

Permalink
CI: automatically create release, upload windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
chipitsine committed Dec 11, 2023
1 parent 2e88c74 commit a553514
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release_by_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

on:
push:
tags: [ "v*" ]

permissions: write-all

jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

build-windows:
needs: release
strategy:
matrix:
arch: [ Win32, x64, ARM64 ]
runs-on: windows-2022
name: windows - ${{ matrix.arch }}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
autoconf
automake
diffutils
libtool
gcc
git
patch
perl
- uses: actions/checkout@main
- shell: msys2 {0}
run: ./autogen.sh
- shell: cmd
run: cmake -Bbuild -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=local
- shell: cmd
run: cmake --build build --config Release
- shell: cmd
run: cmake --install build --config Release
- shell: pwsh
run: |
Compress-Archive -Path local\* local.zip
- name: upload release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: local.zip
asset_name: windows-${{ matrix.arch }}-${{ github.ref }}
asset_content_type: application/zip

0 comments on commit a553514

Please sign in to comment.