Merge pull request #1162 from logicality-io/dotnet8 #41
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
# This was generated by tool. Edits will be overwritten. | |
name: webhook-relay-ci | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/webhook-relay-** | |
- libs/webhook-relay** | |
- build/** | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/webhook-relay-** | |
- libs/webhook-relay** | |
- build/** | |
tags: | |
- webhook-relay-** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${secrets.GITHUB_TOKEN} | |
LOGICALITY_NUGET_ORG: ${secrets.LOGICALITY_NUGET_ORG} | |
WEBHOOKRELAYTOKENKEY: ${secrets.WEBHOOKRELAYTOKENKEY} | |
WEBHOOKRELAYTOKENSECRET: ${secrets.WEBHOOKRELAYTOKENSECRET} | |
WEBHOOKURL: ${secrets.WEBHOOKURL} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Log into GitHub Container Registry | |
run: echo "${{secrets.GITHUB_TOKEN}}" | docker login ghcr.io -u ${{github.actor}} --password-stdin | |
- name: Setup Dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Print Env | |
run: printenv | |
shell: bash | |
- name: Test | |
timeout-minutes: 5 | |
run: ./build.ps1 webhook-relay-test | |
shell: pwsh | |
- name: Pack | |
run: ./build.ps1 webhook-relay-pack | |
shell: pwsh | |
- name: Push to GitHub | |
if: github.event_name == 'push' | |
continue-on-error: true | |
run: ./build.ps1 push-github | |
shell: pwsh | |
- name: Push to Nuget.org (on tag) | |
if: startsWith(github.ref, 'refs/tags/webhook-relay') | |
continue-on-error: true | |
run: ./build.ps1 push-nugetorg | |
shell: pwsh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts |