From cdbf7e13460dadeec290a03f1266c9ff6b6338b0 Mon Sep 17 00:00:00 2001 From: Ben Bachem <10088265+bezbac@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:28:15 +0100 Subject: [PATCH] Setup release CI --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ zellij-tabula.plugin.zsh | 2 ++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c650f99 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + # Push events to any matching semantic version tag. + # For example, 1.10.1 or 2.0.0 or 3.0.0-alpha. + +jobs: + release: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install rust toolchain + uses: dtolnay/rust-toolchain@1.82.0 + with: + components: rustfmt, clippy + targets: wasm32-wasi + + - name: Build + run: cargo build --release + working-directory: ./zellij + + - name: Build changelog + id: changelog + uses: mikepenz/release-changelog-builder-action@v4 + with: + configuration: "release-changelog-builder-config.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + + - name: Create release + id: create_release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref }} + name: Release ${{ steps.get_version.outputs.VERSION }} + body: ${{steps.changelog.outputs.changelog}} + draft: false + prerelease: false + files: | + zellij/target/wasm32-wasi/release/zellij-tabula.wasm + zellij-tabula.plugin.zsh diff --git a/zellij-tabula.plugin.zsh b/zellij-tabula.plugin.zsh index 0ca8deb..c5abfd9 100644 --- a/zellij-tabula.plugin.zsh +++ b/zellij-tabula.plugin.zsh @@ -1,3 +1,5 @@ +export ZELLIJ_TABULA_ZSH_PLUGIN_VERSION="0.1.0" + chpwd() { if [[ -n $ZELLIJ ]]; then zellij pipe --name tabula -- "'$ZELLIJ_PANE_ID' '$PWD'"