Bump version to 0.9.1 #57
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: Build waytrogen | |
| on: | |
| push: | |
| tags: | |
| - "*.*.*" | |
| jobs: | |
| build-prefix-usr-binary: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get code | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: libgtk-4-1 openssl libsqlite3-0 libsqlite3-dev libglib2.0-dev sqlite3 libgtk-4-dev meson ninja-build cargo gettext desktop-file-utils | |
| version: cargo-deps-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache Rust Artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-directories: "./target" | |
| - name: Build waytrogen | |
| run: cargo build --release | |
| - name: Upload ccompiled binary | |
| uses: actions/upload-artifact@v4 | |
| id: compiled-meson-project | |
| with: | |
| name: waytrogen_${{ github.ref_name }}_amd64 | |
| path: ./target/release/waytrogen | |
| package-deb-file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get code | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: libgtk-4-1 openssl libsqlite3-0 libsqlite3-dev libglib2.0-dev sqlite3 libgtk-4-dev meson ninja-build cargo gettext desktop-file-utils | |
| version: cargo-deps-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache Rust Artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-directories: "builddir/target" | |
| - name: Build waytrogen | |
| run: | | |
| TAG=${{ github.ref_name }} | |
| PACKAGE_NAME="waytrogen_${TAG}_amd64" | |
| PREFIX="debpkgs/${PACKAGE_NAME}" | |
| echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV | |
| sed -i "s/VERSION/${TAG}/" meson.build | |
| meson setup builddir --prefix="$(realpath $PREFIX)" | |
| meson compile -C builddir | |
| meson install -C builddir | |
| mkdir -p "$PREFIX/DEBIAN" | |
| mv debpkgs/control debpkgs/postinst "$PREFIX/DEBIAN" | |
| sed -i "s/VERSION/${TAG}/" "$PREFIX/DEBIAN/control" | |
| chmod 755 "$PREFIX/DEBIAN/postinst" | |
| dpkg-deb --build "$PREFIX" | |
| - name: Upload deb package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "${{ env.PACKAGE_NAME }}.deb" | |
| path: debpkgs/*.deb | |
| create-release: | |
| needs: [ build-prefix-usr-binary, package-deb-file ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get generic build prefix usr binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: waytrogen_${{ github.ref_name }}_amd64 | |
| - name: Rename precompiled binary | |
| run: mv waytrogen waytrogen_${{ github.ref_name }}_amd64 | |
| - name: Get deb file | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: waytrogen_${{ github.ref_name }}_amd64.deb | |
| - name: Publish GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| waytrogen_${{ github.ref_name }}_amd64 | |
| waytrogen_${{ github.ref_name }}_amd64.deb | |
| make_latest: 'true' | |
| publish-waytrogen-to-aur: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get AUR PKGBUILD | |
| run: | | |
| git clone https://aur.archlinux.org/waytrogen.git | |
| - name: Prepare PKGBUILD | |
| run: | |
| sed -i "s/pkgver=.*/pkgver=${{ github.ref_name }}/" waytrogen/PKGBUILD | |
| - name: Publish to AUR | |
| uses: KSXGitHub/github-actions-deploy-aur@v4.1.1 | |
| with: | |
| pkgname: waytrogen | |
| pkgbuild: ./waytrogen/PKGBUILD | |
| commit_username: ${{ secrets.AUR_USERNAME }} | |
| commit_email: ${{ secrets.AUR_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: Update to ${{ github.ref_name }} | |
| publish-waytrogen-bin-to-aur: | |
| permissions: | |
| contents: write | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get AUR PKGBUILD | |
| run: | | |
| git clone https://aur.archlinux.org/waytrogen-bin.git | |
| - name: Prepare PKGBUILD | |
| run: | |
| sed -i "s/pkgver=.*/pkgver=${{ github.ref_name }}/" waytrogen-bin/PKGBUILD | |
| - name: Publish to AUR | |
| uses: KSXGitHub/github-actions-deploy-aur@v4.1.1 | |
| with: | |
| pkgname: waytrogen-bin | |
| pkgbuild: ./waytrogen-bin/PKGBUILD | |
| commit_username: ${{ secrets.AUR_USERNAME }} | |
| commit_email: ${{ secrets.AUR_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: Update to ${{ github.ref_name }} |