Update to 0.23 #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Setup MSYS2 environment | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: mingw-w64-ucrt-x86_64-gcc automake autoconf pkg-config make zip patch tar | |
- name: Build binaries | |
run: make -j2 MAKE="make -j2" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: zip-archive | |
path: build/gettext-tools*.zip | |
- uses: nuget/setup-nuget@v2 | |
- name: Build NuGet package | |
run: make nuget | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: nuget-package | |
path: build/*.nupkg | |
publish-release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: zip-archive | |
- uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
prerelease: true | |
artifacts: "*.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
publish-nuget: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nuget-package | |
- uses: nuget/setup-nuget@v1 | |
with: | |
nuget-api-key: ${{ secrets.NUGET_API_KEY }} | |
nuget-api-key-source: https://www.nuget.org/api/v2/package | |
- name: Publish NuGet package | |
run: nuget push *.nupkg -Source https://www.nuget.org/api/v2/package |