bump version 0.8.19 #87
Workflow file for this run
This file contains hidden or 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: Chalet Snapshot | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| # branches: | |
| # - main | |
| # pull_request: | |
| # branches: | |
| # - main | |
| env: | |
| # IS_BRANCH: ${{ github.ref_type == 'branch' }} | |
| IS_PRERELEASE: ${{ github.ref_type == 'branch' }} | |
| CI: 1 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| release: ${{ steps.release.outputs.release }} | |
| tag: ${{ steps.tag.outputs.tag }} | |
| steps: | |
| - name: "Generate Timestamp" | |
| run: echo "timestamp=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT | |
| id: timestamp | |
| - name: "Generate Branch Release Name" | |
| run: echo "branchRelease=snapshot (${{ github.ref_name }}-${{ steps.timestamp.outputs.timestamp }})" >> $GITHUB_OUTPUT | |
| id: branchRelease | |
| - name: "Generate Branch Release Tag" | |
| run: echo "branchTag=snapshot-${{ github.ref_name }}-${{ steps.timestamp.outputs.timestamp }}" >> $GITHUB_OUTPUT | |
| id: branchTag | |
| - name: "Generate Release Name" | |
| # run: echo "release=Chalet ${{ env.IS_BRANCH && steps.branchRelease.outputs.branchRelease || github.ref_name }}" >> $GITHUB_OUTPUT | |
| run: echo "release=Chalet ${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| id: release | |
| - name: "Generate Tag Name" | |
| # run: echo "tag=${{ env.IS_BRANCH && steps.branchTag.outputs.branchTag || github.ref_name }}" >> $GITHUB_OUTPUT | |
| run: echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| id: tag | |
| - name: "Checkout" | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ env.github.ref }} | |
| - name: "Create Tag" | |
| if: github.ref_type == 'branch' && github.event_name != 'pull_request' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| run: | | |
| git tag ${{ steps.tag.outputs.tag }} | |
| git push --tags | |
| - name: "Create Release" | |
| if: github.event_name != 'pull_request' | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| name: ${{ steps.release.outputs.release }} | |
| tag: ${{ steps.tag.outputs.tag }} | |
| commit: ${{ github.sha }} | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| draft: true | |
| prerelease: ${{ env.IS_PRERELEASE }} | |
| all-linux: | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04] | |
| # See http://azure.archive.ubuntu.com/ubuntu/dists/jammy/main/ | |
| triplet: [x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf] | |
| include: | |
| - os: ubuntu-22.04 | |
| osId: jammy | |
| - triplet: x86_64-linux-gnu | |
| arch: amd64 | |
| - triplet: aarch64-linux-gnu | |
| arch: arm64 | |
| crossBuild: true | |
| - triplet: arm-linux-gnueabihf | |
| arch: armhf | |
| crossBuild: true | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.triplet }} | |
| env: | |
| CHALET_BIN: bin/x64-linux/chalet | |
| DEFAULT_PACKAGES: "zip debhelper uuid-dev ninja-build" | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ env.github.ref }} | |
| - name: "Check sources.list" | |
| run: cat /etc/apt/sources.list | |
| - name: "Setup" | |
| if: matrix.crossBuild == true | |
| run: | | |
| sudo sed -i "s|deb |deb [arch=amd64,i386] |g" /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }} main restricted" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }}-updates main restricted" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }} universe" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }}-updates universe" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }} multiverse" | sudo tee -a /etc/apt/sources.list | |
| echo "deb [arch=${{ matrix.arch }}] http://ports.ubuntu.com/ ${{ matrix.osId }}-updates multiverse" | sudo tee -a /etc/apt/sources.list | |
| sudo dpkg --add-architecture ${{ matrix.arch }} | |
| - name: "Get Packages" | |
| run: | | |
| sudo apt update | |
| sudo apt install ${{ env.DEFAULT_PACKAGES }} | |
| - name: "Get Packages (${{ matrix.arch }})" | |
| if: matrix.crossBuild == true | |
| run: sudo apt install uuid-dev:${{ matrix.arch }} gcc-${{ matrix.triplet }} g++-${{ matrix.triplet }} binutils-${{ matrix.triplet }} | |
| - name: "Terminal Test" | |
| run: ${{ env.CHALET_BIN }} termtest | |
| - name: "Fetch Dependencies" | |
| run: bash ./fetch_externals.sh | |
| - name: "Build" | |
| run: ${{ env.CHALET_BIN }} -c Release -t ${{ matrix.triplet }}-gcc -b native bundle | |
| - name: "Run: Tests" | |
| if: matrix.crossBuild != true | |
| run: ${{ env.CHALET_BIN }} run tests | |
| - name: "Upload" | |
| uses: ncipollo/release-action@v1 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| name: ${{ needs.create-release.outputs.release }} | |
| tag: ${{ needs.create-release.outputs.tag }} | |
| commit: ${{ github.sha }} | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| artifacts: | | |
| dist/chalet-*-linux-gnu*.zip | |
| dist/chalet_*.deb | |
| draft: true | |
| prerelease: ${{ env.IS_PRERELEASE }} | |
| all-macos: | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14] | |
| triplet: [arm64-apple-darwin, x86_64-apple-darwin, universal-apple-darwin] | |
| include: | |
| - triplet: arm64-apple-darwin | |
| arch: arm64 | |
| crossBuild: true | |
| - triplet: x86_64-apple-darwin | |
| arch: x86_64 | |
| crossBuild: true | |
| - triplet: universal-apple-darwin | |
| arch: universal | |
| crossBuild: true | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.triplet }} | |
| env: | |
| CHALET_BIN: bin/universal-macos/chalet | |
| MACOS_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }} | |
| MACOS_APPLE_ID: ${{ secrets.MACOS_APPLE_ID }} | |
| MACOS_CHALET_APP_PWD: ${{ secrets.MACOS_CHALET_APP_PWD }} | |
| MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} | |
| MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
| MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
| steps: | |
| - name: "Prepare Environment for Signing" | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} | |
| p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
| - name: "Create Keychain profile" | |
| run: xcrun notarytool store-credentials "ChaletProfile" --apple-id "$MACOS_APPLE_ID" --password "$MACOS_CHALET_APP_PWD" --team-id "$MACOS_TEAM_ID" | |
| - name: "Checkout" | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: "Get Packages" | |
| run: brew install ninja | |
| - name: "Terminal Test" | |
| run: ${{ env.CHALET_BIN }} termtest | |
| - name: "Fetch Dependencies" | |
| run: bash ./fetch_externals.sh | |
| - name: "Build" | |
| run: ${{ env.CHALET_BIN }} --os-target-version 11.0 --signing-identity "$MACOS_SIGNING_IDENTITY" -c Release -t apple-llvm -a ${{ matrix.arch }} -b native bundle | |
| - name: "Notarize" | |
| run: | | |
| xcrun notarytool submit ./dist/chalet-${{ matrix.triplet }}.zip --keychain-profile "ChaletProfile" --wait | |
| - name: "Run: Tests" | |
| if: matrix.crossBuild != true | |
| run: ${{ env.CHALET_BIN }} run tests | |
| - name: "Upload" | |
| uses: ncipollo/release-action@v1 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| name: ${{ needs.create-release.outputs.release }} | |
| tag: ${{ needs.create-release.outputs.tag }} | |
| commit: ${{ github.sha }} | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| artifacts: dist/chalet-${{ matrix.triplet }}.zip | |
| draft: true | |
| prerelease: ${{ env.IS_PRERELEASE }} | |
| all-windows: | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022] | |
| triplet: [x86_64-pc-windows-msvc, arm64-pc-windows-msvc] | |
| include: | |
| - triplet: x86_64-pc-windows-msvc | |
| arch: x64 | |
| compilerEnv: x64 | |
| - triplet: arm64-pc-windows-msvc | |
| arch: arm64 | |
| compilerEnv: amd64_arm64 | |
| crossBuild: true | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.triplet }} | |
| env: | |
| CHALET_BIN: bin/x64-windows/chalet | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: "Get MSVC Environment" | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.compilerEnv }} | |
| - name: "Terminal Test" | |
| run: ${{ env.CHALET_BIN }} termtest | |
| - name: "Fetch Dependencies" | |
| run: bash ./fetch_externals.sh | |
| - name: "Build" | |
| run: ${{ env.CHALET_BIN }} -c Release -t vs-stable -a ${{ matrix.arch }} -b native bundle | |
| - name: "Run: Tests" | |
| if: matrix.crossBuild != true | |
| run: ${{ env.CHALET_BIN }} run tests | |
| - name: "Rename Installer" | |
| run: mv dist/chalet-windows-installer.exe dist/chalet-${{ matrix.triplet }}-installer.exe | |
| - name: "Upload" | |
| uses: ncipollo/release-action@v1 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| name: ${{ needs.create-release.outputs.release }} | |
| tag: ${{ needs.create-release.outputs.tag }} | |
| commit: ${{ github.sha }} | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| artifacts: | | |
| dist/chalet-${{ matrix.triplet }}.zip | |
| dist/chalet-*-installer.exe | |
| draft: true | |
| prerelease: ${{ env.IS_PRERELEASE }} | |
| do-release: | |
| runs-on: ubuntu-22.04 | |
| needs: [create-release, all-linux, all-macos, all-windows] | |
| steps: | |
| - name: "Release" | |
| uses: ncipollo/release-action@v1 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| name: ${{ needs.create-release.outputs.release }} | |
| tag: ${{ needs.create-release.outputs.tag }} | |
| commit: ${{ github.sha }} | |
| allowUpdates: true | |
| generateReleaseNotes: true | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: false | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| draft: false | |
| prerelease: ${{ env.IS_PRERELEASE }} | |
| homebrew-release: | |
| runs-on: macos-14 | |
| needs: [create-release, all-linux, all-macos, all-windows] | |
| steps: | |
| - name: "Checkout chalet-org/homebrew-chalet" | |
| uses: actions/checkout@v5 | |
| with: | |
| path: homebrew | |
| ref: 'main' | |
| repository: chalet-org/homebrew-chalet | |
| token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| - name: "Update Casks" | |
| working-directory: homebrew | |
| run: | | |
| ./make_cask.sh ${{ needs.create-release.outputs.tag }} | |
| git config --global user.name "chalet [bot]" | |
| git config --global user.email "${{ secrets.RELEASE_BOT_EMAIL }}" | |
| git add -A | |
| git commit -m "Update Casks from release: ${{ needs.create-release.outputs.tag }}" | |
| git push | |