summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2022-07-06 15:23:17 +0200
committerSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2022-09-08 16:50:38 +0200
commitc46cd15f16f5c747336204f0487039191c595cf6 (patch)
treebc6f02552d35301741b5d3f2a70b20850d0f438d
parentf404afbaff0f0ab49edd25d51ebd2312e8d81228 (diff)
downloadelementary-xfce-build-release-tarball.tar.gz
ci: Build a release tarball on PRs (Fixes #312)build-release-tarball
On a pull request: build the tarball and add a comment to the PR with a link to the resource. On push to master: run the standard symlink check.
-rw-r--r--.github/workflows/pull-request.yml37
-rw-r--r--.github/workflows/symlinks-check.yml (renamed from .github/workflows/symlinks.yml)5
2 files changed, 41 insertions, 1 deletions
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
new file mode 100644
index 00000000..4ea7d10a
--- /dev/null
+++ b/.github/workflows/pull-request.yml
@@ -0,0 +1,37 @@
+name: "Check symlinks and build theme"
+
+on: pull_request
+
+jobs:
+ check:
+ name: Check for dangling symlinks
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v2
+ - name: Check symlinks and build theme
+ shell: bash
+ run: |
+ sudo apt install -y libgtk-3-dev optipng --no-install-recommends
+ ./configure
+ make test
+ make
+ cd build
+ tar -cf elementary-xfce.tar.gz *
+ - name: Upload theme artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: elementary-xfce
+ path: build/elementary-xfce.tar.gz
+ - name: Add comment with link
+ uses: actions/github-script@v5
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: "Get the theme build from this PR for easy local testing: [elementary-xfce.zip](https://nightly.link/shimmerproject/elementary-xfce/actions/runs/${{ github.run_id }}/elementary-xfce.zip)"
+ })
diff --git a/.github/workflows/symlinks.yml b/.github/workflows/symlinks-check.yml
index c58fac5f..a32d5930 100644
--- a/.github/workflows/symlinks.yml
+++ b/.github/workflows/symlinks-check.yml
@@ -1,6 +1,9 @@
name: "Check symlinks"
-on: [pull_request, push]
+on:
+ push
+ branches:
+ - master
jobs:
check: