chore(master): release 0.2.44 (#100) #222
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-deploy | |
on: | |
push: | |
branches: [ "master" ] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
packages: write | |
concurrency: | |
group: "build" | |
cancel-in-progress: true | |
jobs: | |
build: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go environment | |
uses: actions/[email protected] | |
with: | |
go-version: 'oldstable' | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Setup .NET environment | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
source-url: https://nuget.pkg.github.com/tuihub/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Setup Rust environment | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Setup Dart environment | |
uses: dart-lang/[email protected] | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
- name: Install Protoc Plugins | |
run: make install-plugins | |
- name: Setup bufbuild | |
uses: bufbuild/[email protected] | |
- name: Build | |
run: make generate | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: 'docs' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@main | |
- name: Apply Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'chore: apply auto code generation' | |
- name: Build C# project | |
run: dotnet build TuiHub.Protos.csproj --configuration Release | |
- name: Create nuget package | |
run: nuget pack TuiHub.Protos.csproj -Prop Configuration=Release -IncludeReferencedProjects | |
env: | |
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true | |
- name: Publish nuget package to GPR | |
run: dotnet nuget push *.nupkg --skip-duplicate | |
- name: Publish nuget package to nuget.org | |
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} |