chore: bump to v0.24.0 #137
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: Release (tagged) | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release tag (e.g. v1.2.3)" | |
| required: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-binary: | |
| runs-on: depot-ubuntu-24.04-16 | |
| container: registry.depot.dev/dwd5s9sq7d:arch-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| tag: ${{ steps.meta.outputs.tag }} | |
| commit: ${{ steps.commit.outputs.commit }} | |
| artifact: ${{ steps.meta.outputs.artifact }} | |
| env: | |
| BUILD_TYPE: Release | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| steps: | |
| - name: Resolve tag | |
| id: meta | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| TAG="${{ inputs.tag || '' }}" | |
| if [[ -z "$TAG" ]]; then | |
| echo "When dispatching manually, you must provide 'tag' (e.g. v1.2.3)." >&2 | |
| exit 1 | |
| fi | |
| else | |
| TAG="${GITHUB_REF_NAME}" | |
| fi | |
| # Optional: validate tag format like v1.2.3 (allow v1 or v1.2 etc.) | |
| if ! [[ "$TAG" =~ ^v[0-9]+(\.[0-9]+)*$ ]]; then | |
| echo "Tag '$TAG' does not match expected format (e.g. v1.2.3)." >&2 | |
| exit 1 | |
| fi | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "artifact=vicinae-linux-x86_64-$TAG.tar.gz" >> "$GITHUB_OUTPUT" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ steps.meta.outputs.tag }} | |
| - name: Resolve commit | |
| id: commit | |
| run: | | |
| git config --global --add safe.directory "$(pwd)" | |
| echo "commit=$(git rev-parse --short=9 HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Prepare dirs | |
| run: mkdir -p build install | |
| - name: Configure CMake | |
| run: | | |
| cd build | |
| cmake -G Ninja .. \ | |
| -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | |
| -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ | |
| -DBUILD_TESTS=ON \ | |
| -DVICINAE_PROVENANCE=binary_release \ | |
| -DVICINAE_GIT_TAG="${{ steps.meta.outputs.tag }}" \ | |
| -DVICINAE_GIT_COMMIT_HASH="${{ steps.commit.outputs.commit }}" \ | |
| -DLTO=ON \ | |
| -DUSE_SYSTEM_CMARK_GFM=OFF \ | |
| -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" | |
| - name: Build | |
| run: | | |
| cmake --build build --config ${BUILD_TYPE} --parallel $(nproc) | |
| - name: Run Tests | |
| run: make test | |
| - name: Install | |
| run: | | |
| cd build | |
| cmake --install . --config ${BUILD_TYPE} | |
| - name: Package (tar install dir) | |
| run: | | |
| tar -czvf "${{ steps.meta.outputs.artifact }}" -C "${INSTALL_DIR}" . | |
| - name: Create draft GitHub Release and upload asset | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.meta.outputs.tag }} | |
| name: ${{ steps.meta.outputs.tag }} | |
| draft: true | |
| generate_release_notes: true | |
| files: | | |
| ${{ steps.meta.outputs.artifact }} | |
| build-appimage: | |
| needs: build-binary | |
| runs-on: ${{ matrix.target.runner }} | |
| container: registry.depot.dev/dwd5s9sq7d:${{ matrix.target.tag }} | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - arch: amd64 | |
| runner: depot-ubuntu-24.04-16 | |
| tag: appimage-amd64-latest | |
| - arch: arm64 | |
| runner: depot-ubuntu-24.04-arm-16 | |
| tag: appimage-arm64-latest | |
| name: build-appimage (${{ matrix.target.arch }}) | |
| env: | |
| BUILD_TYPE: Release | |
| INSTALL_DIR: ${{ github.workspace }}/install | |
| APP_DIR: ${{ github.workspace }}/appdir | |
| APPIMAGE_EXTRACT_AND_RUN: "1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ needs.build-binary.outputs.tag }} | |
| - name: Prepare dirs | |
| run: mkdir -p build install | |
| - name: Configure CMake | |
| run: | | |
| cd build | |
| cmake -G Ninja .. \ | |
| -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | |
| -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ | |
| -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ | |
| -DVICINAE_PROVENANCE=appimage \ | |
| -DVICINAE_GIT_TAG="${{ needs.build-binary.outputs.tag }}" \ | |
| -DVICINAE_GIT_COMMIT_HASH="${{ needs.build-binary.outputs.commit }}" \ | |
| -DLTO=ON | |
| - name: Build | |
| run: | | |
| cmake --build build --config ${BUILD_TYPE} --parallel $(nproc) | |
| - name: Install | |
| run: | | |
| cmake --install build | |
| - name: Make AppImage | |
| run: | | |
| chmod +x ./scripts/mkappimage.sh | |
| ./scripts/mkappimage.sh "${INSTALL_DIR}" "${APP_DIR}" | |
| - name: Upload AppImage to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.build-binary.outputs.tag }} | |
| name: ${{ needs.build-binary.outputs.tag }} | |
| files: | | |
| *.AppImage | |
| build-macos-dmg: | |
| needs: build-binary | |
| permissions: | |
| contents: write | |
| uses: ./.github/workflows/macos-dmg.yaml | |
| secrets: inherit | |
| with: | |
| tag: ${{ needs.build-binary.outputs.tag }} | |
| commit: ${{ needs.build-binary.outputs.commit }} | |
| upload-to-release: true | |
| publish-release: | |
| needs: [build-binary, build-appimage, build-macos-dmg] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Publish release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release edit "${{ needs.build-binary.outputs.tag }}" \ | |
| --repo "${{ github.repository }}" \ | |
| --draft=false --latest | |
| trigger-packaging: | |
| needs: publish-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger bumpver in packaging-arch | |
| env: | |
| GH_TOKEN: ${{ secrets.PACKAGING_AUR_TOKEN }} | |
| run: | | |
| gh workflow run bumpver.yml --repo vicinaehq/packaging-arch | |