-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from bacongobbler/fix-workflows
fix github workflows
- Loading branch information
Showing
5 changed files
with
138 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build and test application | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [linux-debug, linux-release, macos-debug, macos-release, windows-debug, windows-release] | ||
include: | ||
- build: linux-debug | ||
os: ubuntu-latest | ||
config: debug | ||
- build: linux-release | ||
os: ubuntu-latest | ||
config: release | ||
- build: macos-debug | ||
os: macos-latest | ||
config: debug | ||
- build: macos-release | ||
os: macos-latest | ||
config: release | ||
- build: windows-debug | ||
os: windows-latest | ||
config: debug | ||
- build: windows-release | ||
os: windows-latest | ||
config: release | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get Bindle source for testing | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: deislabs/bindle | ||
path: bindleserver | ||
ref: v0.8.0 | ||
- name: Build Bindle | ||
run: make build | ||
working-directory: bindleserver | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Set MINVERBUILDMETADATA | ||
run: echo MINVERBUILDMETADATA=$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build -c ${{ matrix.config }} --no-restore | ||
- name: Test | ||
env: | ||
BINDLE_SERVER_PATH: ../../../../../bindleserver/target/debug | ||
run: dotnet test -c ${{ matrix.config }} --no-build --verbosity normal |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish packages | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+-preview' | ||
branches: [ main ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Set MINVERBUILDMETADATA | ||
run: echo MINVERBUILDMETADATA=$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
- name: Publish Github Packages | ||
run: | | ||
for nupkg in $(find . -name *.nupkg) | ||
do | ||
echo Pushing $nupkg | ||
dotnet nuget push $nupkg --api-key ${{ secrets.GHPACKAGES_PAT }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate | ||
done | ||
- name: Publish Nuget Packages | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
for nupkg in $(find . -name *.nupkg) | ||
do | ||
echo Pushing $nupkg | ||
dotnet nuget push $nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Create GitHub release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+-preview' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Build Changelog" | ||
id: github_release | ||
uses: mikepenz/release-changelog-builder-action@main | ||
with: | ||
configuration: ".github/workflows/configuration.json" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{ steps.github_release.outputs.changelog }} | ||
prerelease: ${{ contains(github.ref, '-preview') }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |