From ea91aee5020e2e39f55661559cff654719a67fec Mon Sep 17 00:00:00 2001 From: Alexander Sharov Date: Wed, 5 Jun 2024 15:40:32 +0300 Subject: [PATCH] feat: add publish tenv to PPA --- .../{choco.yml => publish-choco.yml} | 4 +- .github/workflows/publish-ppa.yml | 37 +++++++++++++++++++ .../workflows/{snap.yml => publish-snap.yml} | 0 3 files changed, 39 insertions(+), 2 deletions(-) rename .github/workflows/{choco.yml => publish-choco.yml} (97%) create mode 100644 .github/workflows/publish-ppa.yml rename .github/workflows/{snap.yml => publish-snap.yml} (100%) diff --git a/.github/workflows/choco.yml b/.github/workflows/publish-choco.yml similarity index 97% rename from .github/workflows/choco.yml rename to .github/workflows/publish-choco.yml index d5522034..89fad9fd 100644 --- a/.github/workflows/choco.yml +++ b/.github/workflows/publish-choco.yml @@ -1,12 +1,12 @@ --- -name: "Chocolatey Release Pipeline" +name: "Publish release: Chocolatey" on: release: types: [released] jobs: - build: + release: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/publish-ppa.yml b/.github/workflows/publish-ppa.yml new file mode 100644 index 00000000..ade59f20 --- /dev/null +++ b/.github/workflows/publish-ppa.yml @@ -0,0 +1,37 @@ +--- +name: "Publish release: PPA" + +on: + release: + types: [released] + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Update chocolatey checksums + run: | + echo "[INFO] Wait until all artefacts will be uploaded" + sleep 300 + + release_tag=${{ github.event.release.tag_name }} + release_version="${release_tag#v}" + + mkdir -p /tmp/tenv + + echo "[INFO] Download release's tarballs" + curl \ + -SsL \ + -o /tmp/tenv/tenv_${release_tag}_Linux_x86_64.tar.gz \ + https://github.com/tofuutils/tenv/releases/download/${release_tag}/tenv_${release_tag}_Linux_x86_64.tar.gz + + - name: Publish PPA + uses: yuezk/publish-ppa-package@v2 + with: + repository: "ppa:kvendingoldo/tenv" + gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} + gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }} + tarball: /tmp/tenv*.tar.gz + deb_email: "kvendingoldo@gmail.com" + deb_fullname: "tenv" \ No newline at end of file diff --git a/.github/workflows/snap.yml b/.github/workflows/publish-snap.yml similarity index 100% rename from .github/workflows/snap.yml rename to .github/workflows/publish-snap.yml