Skip to content

Commit

Permalink
Add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pg9182 committed Feb 17, 2022
1 parent a6c7184 commit e60bba4
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build
on:
push:
branches:
- '**'
pull_request:

jobs:
stubs:
name: NorthstarStubs
runs-on: ubuntu-latest
container: docker.io/library/alpine:3.15.0
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
apk add mingw-w64-gcc meson
meson setup --cross-file misc/mingw-w64-cross.txt --prefix / build
meson install -C build --destdir destdir
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: NorthstarStubs
path: build/destdir/bin/*.dll
if-no-files-found: error
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

name: Release
on:
push:
tags:
- 'v*'

jobs:
release:
name: NorthstarStubs
runs-on: ubuntu-latest
container: docker.io/library/alpine:3.15.0
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build
run: |
apk add mingw-w64-gcc meson zip
meson setup --cross-file misc/mingw-w64-cross.txt --prefix / build
meson install -C build --destdir destdir
- name: Create zip
run: |
zip -9 -j NorthstarStubs.zip build/destdir/bin/*.dll
sha1sum NorthstarStubs.zip
- name: Create release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: ${{github.ref}}
release_name: ${{github.ref}}
draft: true
prerelease: false

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{steps.release.outputs.upload_url}}
asset_path: ./NorthstarStubs.zip
asset_name: NorthstarStubs.zip
asset_content_type: application/zip

0 comments on commit e60bba4

Please sign in to comment.