Skip to content

Commit

Permalink
Merge pull request #11 from ruccho/feature/release_workflows
Browse files Browse the repository at this point in the history
release workflows
  • Loading branch information
ruccho authored Dec 2, 2024
2 parents 871c193 + 6df625b commit 148a1c3
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Crates

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-nuget:
runs-on: ubuntu-latest
defaults:
run:
working-directory: WaaS/wit2waas
steps:
- uses: actions/checkout@v4
- name: Login to crates.io
run: cargo login ${{ secrets.CARGO_TOKEN }}
- name: Publish
run: cargo publish
26 changes: 26 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish NuGet

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-nuget:
runs-on: ubuntu-latest
defaults:
run:
working-directory: WaaS
steps:
- uses: actions/checkout@v4
- name: get tag name
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release -p:Version=${{ env.VERSION }} --no-restore -o ./publish
- name: Publish
run: dotnet nuget push ./WaaS*.${{ env.VERSION }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
30 changes: 30 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update docs

on:
workflow_dispatch:
release:
types: [published]

jobs:
publish-nuget:
runs-on: ubuntu-latest
defaults:
run:
working-directory: WaaS
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore tools
run: dotnet tool restore
- name: Run docfx
run: dotnet docfx
- name: Generate markdown
run: dotnet dfmg
- name: Restore packages
run: yarn install
working-directory: docs
- name: Deploy
run: GIT_USER=ruccho yarn deploy
working-directory: docs

0 comments on commit 148a1c3

Please # to comment.