Skip to content

Commit

Permalink
Update workflow to separate build and release work (#1)
Browse files Browse the repository at this point in the history
* Update workflow to separate build and release work

* Update to syncromatics/gogitver-action v0.0.7
  • Loading branch information
thzinc authored Dec 31, 2023
1 parent 3c49058 commit 35e5a4b
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,53 @@
name: dotnet package

on: [push]
on:
push:
workflow_dispatch:

jobs:
release:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
- run: git checkout "${GITHUB_REF:11}"
- uses: syncromatics/[email protected].4
- uses: syncromatics/[email protected].7
id: gogitver
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0"
- run: make build package ship
- uses: actions/cache@v3
with:
path: artifacts
key: ${{ steps.gogitver.outputs.version }}-artifacts
- run: make build package
env:
VERSION: ${{ steps.gogitver.outputs.version }}
outputs:
version: ${{ steps.gogitver.outputs.version }}

release:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/cache@v3
with:
path: artifacts
key: ${{ needs.build.outputs.version }}-artifacts
fail-on-cache-miss: true
- run: make ship
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.gogitver.outputs.version }}
release_name: Release ${{ steps.gogitver.outputs.version }}
tag_name: ${{ needs.build.outputs.version }}
release_name: Release ${{ needs.build.outputs.version }}
draft: false
prerelease: false
- uses: actions/[email protected]
Expand Down

0 comments on commit 35e5a4b

Please sign in to comment.