From 19ed32a8daa55c0d632414187405b8fb3c2a747e Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Wed, 1 Jun 2022 02:03:01 -0300 Subject: [PATCH 1/2] Update CI configuration --- .github/workflows/ci.yml | 40 ++++++++++------------------------- .github/workflows/release.yml | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f9de2..88d91f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,19 +4,19 @@ on: push: branches: - main - tags: - - 'v*' pull_request: - branches: + branches: - main + workflow_call: + inputs: + app-version: + type: string + required: true jobs: build: runs-on: macos-latest steps: - - name: Get version number - id: get_version - uses: battila7/get-version-action@v2 - name: Checkout uses: actions/checkout@v2 - name: Cache DMG file @@ -33,12 +33,12 @@ jobs: touch build/*.dmg - name: Build run: | - make zip APP_VERSION=${{ steps.get_version.outputs.version-without-v }} + make zip APP_VERSION=${{ inputs.app-version }} - name: Upload ZIP artifact uses: actions/upload-artifact@v3 with: - name: zip-${{ runner.arch }} - path: build/*.zip + name: zip + path: build/*-app-*.zip if-no-files-found: error test: @@ -54,31 +54,13 @@ jobs: - name: Download ZIP artifact uses: actions/download-artifact@v3 with: - name: zip-${{ runner.arch }} + name: zip path: build - name: Unzip app run: | - unzip *.zip + unzip *-app-$(uname -m).zip working-directory: build - name: Test run: | make install-dependencies make test - - release: - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - needs: test - runs-on: ubuntu-latest - steps: - - name: Download ZIP artifact - uses: actions/download-artifact@v3 - with: - name: zip-${{ runner.arch }} - - name: Upload ZIP to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: '*.zip' - tag: ${{ github.ref }} - file_glob: true - overwrite: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fd894c3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + get-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version-without-v }} + steps: + - name: Get version number + id: get_version + uses: battila7/get-version-action@v2 + + build: + needs: get-version + uses: ./.github/workflows/ci.yml + with: + app-version: needs.get-version.outputs.version + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download ZIP artifact + uses: actions/download-artifact@v3 + with: + name: zip + - name: Upload ZIP to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: '*.zip' + tag: ${{ github.ref }} + file_glob: true + overwrite: true From 3d8d898c2206f644cb043674aa936ecf20734738 Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Mon, 16 May 2022 09:38:10 -0300 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c99ae28..6d87a5c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Native OpenFOAM v2112 as a Mac app**, with binaries compiled from the [OpenFOAM source code](https://develop.openfoam.com/Development/openfoam/-/blob/master/doc/Build.md). Intel and Apple silicon variants. -[![CI](https://github.com/gerlero/openfoam2112-app/actions/workflows/ci.yml/badge.svg)](https://github.com/gerlero/openfoam2112-app/actions/workflows/ci.yml) [![homebrew cask](https://img.shields.io/badge/homebrew%20cask-gerlero%2Fopenfoam%2Fopenfoam2112-informational)](https://github.com/gerlero/homebrew-openfoam) ![GitHub all releases](https://img.shields.io/github/downloads/gerlero/openfoam2112-app/total) +[![CI](https://github.com/gerlero/openfoam2112-app/actions/workflows/ci.yml/badge.svg)](https://github.com/gerlero/openfoam2112-app/actions/workflows/ci.yml) [![Release](https://github.com/gerlero/openfoam2112-app/actions/workflows/release.yml/badge.svg)](https://github.com/gerlero/openfoam2112-app/actions/workflows/release.yml) [![homebrew cask](https://img.shields.io/badge/homebrew%20cask-gerlero%2Fopenfoam%2Fopenfoam2112-informational)](https://github.com/gerlero/homebrew-openfoam) ![GitHub all releases](https://img.shields.io/github/downloads/gerlero/openfoam2112-app/total) ## ⬇️ Install