From 73f9b4ba5015aa763ca5b62917ab32573fe22b6d Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Wed, 6 Jul 2022 15:23:17 +0200 Subject: [PATCH] ci: Build a release tarball (Fixes #312) On a pull request: build the tarball and add a comment to the PR with a link to the resource. On push to master: build the tarball and keep the archive accessible in the associated GitHub Action. --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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 000000000..37b3151df --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: "Build release tarball" + +on: [pull_request, push] + +jobs: + build: + name: Build release tarball + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Build png theme + shell: bash + run: | + sudo apt install -y libgtk-3-dev optipng --no-install-recommends + ./configure + make + cd build + tar -cf elementary-xfce.tar.gz * + - name: Pull request artifacts + if: ${{ github.event_name == 'pull_request' }} + uses: gavv/pull-request-artifacts@v1.0.0 + with: + commit: ${{ github.event.pull_request.head.sha }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + artifacts: build/elementary-xfce.tar.gz + - name: Upload theme artifact + if: ${{ github.event_name == 'push' }} + uses: actions/upload-artifact@v3 + name: elementary-xfce + path: build/elementary-xfce.tar.gz