Skip to content

Commit

Permalink
Publish on GitHub (#188)
Browse files Browse the repository at this point in the history
* add publishing workflow
  • Loading branch information
ekoby authored Nov 25, 2020
1 parent 4f6dc80 commit 505c141
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Release

on:
release:
types: [ published ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: make build dir
run: cmake -E make_directory ${{runner.workspace}}/build
- name: configure cmake
run: cmake -S ${{ github.workspace }} -B ${{runner.workspace}}/build
- name: build
run: cmake --build ${{runner.workspace}}/build
- name: make artifacts
run: cmake --build ${{runner.workspace}}/build --target ziti-prox-c
- name: zip artifacts
if: runner.os != 'Windows'
run: 7z a -tzip ziti-prox-c-${{ runner.os }}.zip ${{runner.workspace}}/build/programs/ziti-prox-c/ziti-prox-c
- name: zip artifacts (WIN)
if: runner.os == 'Windows'
run: 7z a -tzip ziti-prox-c-${{ runner.os }}.zip ${{runner.workspace}}/build/programs/ziti-prox-c/Debug/ziti-prox-c.exe
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload release bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ziti-prox-c-${{ runner.os }}.zip
asset_name: ziti-prox-c-${{ runner.os }}.zip
asset_content_type: application/octet-stream
2 changes: 0 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: C/C++ CI

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

Expand Down

0 comments on commit 505c141

Please sign in to comment.