Commit 2e17f7261206348026cf510f8b519c41a4e2e80a
1 parent
1be1fa42
Exists in
develop
Starting macos bundler.
Showing
2 changed files
with
87 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,50 @@ | @@ -0,0 +1,50 @@ | ||
| 1 | +name: Publish | ||
| 2 | +on: | ||
| 3 | + push: | ||
| 4 | + branches: | ||
| 5 | + - macos | ||
| 6 | + pull_request: | ||
| 7 | + branches: | ||
| 8 | + - master | ||
| 9 | + - develop | ||
| 10 | +jobs: | ||
| 11 | + macos: | ||
| 12 | + name: Publish macos | ||
| 13 | + runs-on: macos-latest | ||
| 14 | + steps: | ||
| 15 | + - name: Checkout | ||
| 16 | + uses: actions/checkout@v3 | ||
| 17 | + - uses: oprypin/find-latest-tag@v1 | ||
| 18 | + id: gettag | ||
| 19 | + with: | ||
| 20 | + repository: PerryWerneck/pw3270 | ||
| 21 | + sort-tags: true | ||
| 22 | + releases-only: true | ||
| 23 | + - name: Install Pre reqs | ||
| 24 | + run: | | ||
| 25 | + brew update | ||
| 26 | + brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig gtk+3 | ||
| 27 | + brew upgrade | ||
| 28 | + - uses: robinraju/release-downloader@v1.7 | ||
| 29 | + with: | ||
| 30 | + repository: "PerryWerneck/lib3270" | ||
| 31 | + latest: true | ||
| 32 | + fileName: "macos-lib3270.tar.xz" | ||
| 33 | + - uses: robinraju/release-downloader@v1.7 | ||
| 34 | + with: | ||
| 35 | + repository: "PerryWerneck/libv3270" | ||
| 36 | + latest: true | ||
| 37 | + fileName: "macos-libv3270.tar.xz" | ||
| 38 | + - name: build | ||
| 39 | + run: ./mac/ci-build.sh | ||
| 40 | + - uses: ncipollo/release-action@v1 | ||
| 41 | + with: | ||
| 42 | + tag: ${{ steps.gettag.outputs.tag }} | ||
| 43 | + artifacts: "macos-pw3270.tar.xz" | ||
| 44 | + allowUpdates: true | ||
| 45 | + draft: true | ||
| 46 | + makeLatest: true | ||
| 47 | + omitBody: true | ||
| 48 | + omitPrereleaseDuringUpdate: true | ||
| 49 | + replacesArtifacts: true | ||
| 50 | + |
| @@ -0,0 +1,37 @@ | @@ -0,0 +1,37 @@ | ||
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +PROJECT_NAME=$(grep AC_INIT configure.ac | cut -d[ -f2 | cut -d] -f1) | ||
| 4 | +VERSION=$(grep AC_INIT configure.ac | cut -d[ -f3 | cut -d] -f1) | ||
| 5 | + | ||
| 6 | +unpack() { | ||
| 7 | + | ||
| 8 | + echo "Unpacking ${1}" | ||
| 9 | + | ||
| 10 | + tar -C $(brew --cellar) -Jxvf macos-${1}.tar.xz | ||
| 11 | + if [ "$?" != "0" ]; then | ||
| 12 | + exit -1 | ||
| 13 | + fi | ||
| 14 | + | ||
| 15 | + brew link ${1} | ||
| 16 | + if [ "$?" != "0" ]; then | ||
| 17 | + exit -1 | ||
| 18 | + fi | ||
| 19 | + | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +unpack lib3270 | ||
| 23 | +unpack libv3270 | ||
| 24 | + | ||
| 25 | +./autogen.sh --prefix="/${PROJECT_NAME}/${VERSION}" | ||
| 26 | +if [ "$?" != "0" ]; then | ||
| 27 | + exit -1 | ||
| 28 | +fi | ||
| 29 | + | ||
| 30 | +make all | ||
| 31 | +if [ "$?" != "0" ]; then | ||
| 32 | + exit -1 | ||
| 33 | +fi | ||
| 34 | + | ||
| 35 | +make DESTDIR=.bin/package install | ||
| 36 | +tar --create --xz --file=macos-${PROJECT_NAME}.tar.xz --directory=.bin/package --verbose . | ||
| 37 | + |