1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 05:29:11 +00:00

Run workflows on PRs, add appimage to releases.

This commit is contained in:
Brenden Matthews 2021-03-02 07:20:57 -06:00
parent 6e6d5f2bc1
commit 770696bef3
No known key found for this signature in database
GPG Key ID: B49ABB7270D9D4FD
4 changed files with 39 additions and 6 deletions

View File

@ -1,5 +1,5 @@
name: Build and test on Linux
on: [push]
on: [push, pull_request]
jobs:
build:
strategy:

View File

@ -1,5 +1,5 @@
name: Build and test on macOS
on: [push]
on: [push, pull_request]
jobs:
build:
strategy:

View File

@ -10,9 +10,6 @@ on:
tags:
- v*
# Run tests for any PRs.
pull_request:
env:
IMAGE_NAME: conky
DOCKERHUB_ACCOUNT: brndnmtthws

View File

@ -1,5 +1,14 @@
name: Build AppImage
on: [push]
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
@ -48,3 +57,30 @@ jobs:
with:
name: conky-appimage
path: conky*.AppImage
- name: Get Name of Artifact
run: |
ARTIFACT_PATHNAME=$(ls conky*.AppImage | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo ::set-env name=ARTIFACT_NAME::${ARTIFACT_NAME}
echo ::set-env name=ARTIFACT_PATHNAME::${ARTIFACT_PATHNAME}
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.ARTIFACT_PATHNAME }}
asset_name: ${{ env.ARTIFACT_NAME }}