Skip to content

Commit

Permalink
Added build and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BeneSim committed Jan 25, 2020
1 parent c05595e commit e365866
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build App

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Login
uses: azure/docker-login@v1
with:
login-server: docker.pkg.github.com
username: BeneSim
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compile
run: |
mkdir build
docker container run --rm -v $(pwd):/app -w /app/build docker.pkg.github.com/benesim/beneoverlay/gcc-windows:latest qmake ..
docker container run --rm -v $(pwd):/app -w /app/build docker.pkg.github.com/benesim/beneoverlay/gcc-windows:latest make
echo ${{ github.ref }}
- name: Package
run: |
cd build
zip BeneOverlay.zip BeneOverlay.exe
- name: Archive Artifact
uses: actions/upload-artifact@v1
with:
name: BeneOverlay
path: build/BeneOverlay.zip
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: BeneOverlay
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Assets
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./BeneOverlay/BeneOverlay.zip
asset_name: BeneOverlay_x86-64-windows.zip
asset_content_type: application/zip

0 comments on commit e365866

Please sign in to comment.