Skip to content

Commit

Permalink
CI: build and upload AppImage on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk authored and Daniël de Kok committed Aug 28, 2020
1 parent 8acd086 commit 0ba9c6e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Test"
on:
push:
tags:
- '*'
jobs:
tests:
strategy:
matrix:
channel:
- "https://nixos.org/channels/nixos-unstable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get release version
run: echo ::set-env name=TAG_NAME::$(echo ${GITHUB_REF:10})
- uses: cachix/install-nix-action@v10
- run: nix-channel --add ${{ matrix.channel }} nixpkgs
- run: nix-channel --update
- name: Build AppImage
run: nix-build appimage.nix
- name: Rename AppImage
id: rename_appimage
run: |
APPIMAGE=Dact-${TAG_NAME}-x86_64.AppImage
cp result/Dact-x86_64.AppImage ${APPIMAGE}
echo ::set-output name=ASSET::$APPIMAGE
- uses: actions/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.rename_appimage.outputs.ASSET }}
asset_name: ${{ steps.rename_appimage.outputs.ASSET }}
asset_content_type: application/octet-stream
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- '*'
jobs:
tests:
strategy:
Expand Down

0 comments on commit 0ba9c6e

Please sign in to comment.