Skip to content

v0.8.0 release.

v0.8.0 release. #35

Workflow file for this run

name: Package
on:
push:
tags:
- v0.*
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Setup variables
run: |
echo "FILE_PATH=dec-${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "FILE_NAME=dec-${GITHUB_REF##*/}.zip" >> $GITHUB_ENV
VERSION_NUMBER=${GITHUB_REF##*/}
VERSION_NUMBER=${VERSION_NUMBER#v}
echo "VERSION_NUMBER=${VERSION_NUMBER}" >> $GITHUB_ENV
- name: Assemble package
run: |
mkdir ${{ env.FILE_PATH }}
cp src/*.cs ${{ env.FILE_PATH }}
cp src/Dec.asmdef* ${{ env.FILE_PATH }}
cp LICENSE* ${{ env.FILE_PATH }}
cp README.md CHANGELOG.md ${{ env.FILE_PATH }}
zip -9 -r ${{ env.FILE_NAME }} ${{ env.FILE_PATH }}
- name: Generate changelog snippet
run: python util/changelog_extract.py > CHANGELOG.snippet.md
- name: Final test
run: dotnet test -f 6.0
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Dec ${{ github.ref }}
body_path: CHANGELOG.snippet.md
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.FILE_NAME }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/zip
- name: NuGet pack
run: dotnet pack src/dec.csproj -c Release --output . -p:PackageVersion=${{ env.VERSION_NUMBER }}
- name: NuGet push
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json