Update GHA.Windows: find working msys2 settings #15
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 & package | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
Build: | |
# convert this to a matrix if builds differ between platforms | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['windows-latest'] | |
steps: | |
- name: Checking out the repo | |
uses: actions/checkout@v4 | |
- name: Install extra packages on Windows | |
if: startsWith(${{ matrix.os }}, 'windows') | |
shell: cmd | |
run: | | |
set "PATH=C:\msys64\MINGW64\bin;C:\msys64\usr\bin;%PATH%" | |
echo %PATH% | |
pacman -Q | |
pacman -S --noconfirm make diffutils patch mingw-w64-x86_64-gcc | |
which sed | |
- name: Building | |
run: sh build.sh | |
- name: Quick test | |
run: sh -c 'echo "puts hello_world; exit;" | ./sasfit-tcl/bin/tclsh8.4' | |
- name: Upload package for publishing job | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package-${{ matrix.os }} | |
path: | | |
*.tar.xz | |
Publish: | |
needs: [Build] | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Download package artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: package-* | |
merge-multiple: true | |
path: dist | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: dist/*.tar.xz |