diff --git a/.github/workflows/ci.yml b/.github/workflows/main.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/main.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..19580bf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +on: + push: + branches: + - release/* + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + with: + fetch-depth: 999 + fetch-tags: true + submodules: true + ssh-key: ${{ secrets.ACCESS_KEY }} + - name: Release Notes + run: | + git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: (\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE_NOTES.md + - name: Build + run: ./build.sh --target Publish --publish --source GitHUb --feed ${{ vars.PUBLIC_NUGET_FEED }} --username ${{ vars.PUBLIC_NUGET_USERNAME }} --token ${{ secrets.PUBLIC_NUGET_APIKEY }} diff --git a/README.md b/README.md index 8561f79..6cce2de 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ A .NET SDK built from the Trybe OpenAPI specification -[![.github/workflows/ci.yml](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/ci.yml/badge.svg)](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/ci.yml) +[![.github/workflows/main.yml](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/main.yml/badge.svg)](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/main.yml) [![.github/workflows/release.yml](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/release.yml/badge.svg)](https://github.com/IngeniumSE/TrybeSDK/actions/workflows/release.yml)