Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
prep for publish of library
  • Loading branch information
mariomatic authored Jan 4, 2022
1 parent d2cbfbf commit c79424f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build, Pack & Publish

on:
push:
branches:
- master # Default release branch
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- name: Get the sources
uses: actions/checkout@v2
- name: Run the build script
uses: cake-build/cake-action@v1
with:
script-path: build.cake
target: Pack
cake-bootstrap: true
- name: Publish on version change
id: publish_nuget
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: Solnet.Metaplex/Solnet.Metaplex.csproj
PACKAGE_NAME: Solnet.Metaplex
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.publish_nuget.outputs.VERSION }}
release_name: ${{ steps.publish_nuget.outputs.VERSION }}
body: ${{ steps.build_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: Solnet.Metaplex/bin/Release/net5.0/ref/Solnet.Metaplex.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}

0 comments on commit c79424f

Please sign in to comment.