Skip to content

Build and Deploy

Build and Deploy #10

name: 'Build and Deploy'
on:
workflow_dispatch:
env:
VERSION: 1.0.${{ github.run_number }}
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: 1. Versioning Release
run: |
sed -i -e 's/1.0/${{ env.VERSION }}/g' ./AddinInfo.cs
cat ./AddinInfo.cs
working-directory: src/CodingWithCalvin.SuperClean
- name: 2. Restoring Packages
run: dotnet restore src/CodingWithCalvin.SuperClean.sln
- name: 4. Building
run: /Applications/Visual\ Studio.app/Contents/MacOS/vstool build --configuration:Release ${{ github.workspace }}/src/CodingWithCalvin.SuperClean.sln
- name: 5. Packing
run: /Applications/Visual\ Studio.app/Contents/MacOS/vstool setup pack ${{ github.workspace }}/src/CodingWithCalvin.SuperClean/bin/Release/net7.0/CodingWithCalvin.SuperClean.dll -d:${{ github.workspace }}/src
- name: 6. Create Tag & Release
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ./src/*.mpack
generateReleaseNotes: true
makeLatest: true
token: ${{ secrets.GH_SECRET }}
commit: ${{ github.sha }}
tag: ${{ env.VERSION }}