Skip to content

Commit

Permalink
ci: Build a release tarball (Fixes #312)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ochosi committed Aug 1, 2022
1 parent f358f09 commit 754c6f0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/symlinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,32 @@ jobs:
sudo apt install -y libgtk-3-dev --no-install-recommends
./configure
make test
- 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: Upload theme artifact
uses: actions/upload-artifact@v3
with:
name: elementary-xfce
path: build/elementary-xfce.tar.gz
- name: Get artifact link
shell: bash
run: |
echo "ARTIFACT_URL=$(curl -H 'Accept: application/vnd.github+json' -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts | grep url)" >> $GITHUB_ENV
echo "${{ env.ARTIFACT_URL }}"
- 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: 'link to the artifact'
})

0 comments on commit 754c6f0

Please sign in to comment.