Skip to content

Commit

Permalink
chore: fix ci (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
latonz authored Mar 18, 2024
1 parent 530066f commit 3bf7bba
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
required: false
type: string
default: '0.0.1-dev'
secrets:
CLOUDFLARE_API_TOKEN:
required: false
CLOUDFLARE_ACCOUNT_ID:
required: false
workflow_dispatch:
inputs:
deploy:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
jobs:
test:
uses: ./.github/workflows/test.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

release-preview:
if: ${{ inputs.create_preview_release }}
Expand All @@ -20,7 +22,7 @@ jobs:
with:
environment: next
secrets:
nuget_api_key: ${{ secrets.NUGET_API_TOKEN }}
NUGET_API_TOKEN: ${{ secrets.NUGET_API_TOKEN }}

docs:
uses: ./.github/workflows/docs.yml
Expand All @@ -29,6 +31,9 @@ jobs:
deploy: true
environment: next
version: ${{ needs.release-preview.outputs.version }}
secrets:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

release-stable-update-branch:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
jobs:
test:
uses: ./.github/workflows/test.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

release:
needs: test
uses: ./.github/workflows/release.yml
with:
environment: stable
secrets:
nuget_api_key: ${{ secrets.NUGET_API_TOKEN }}
NUGET_API_TOKEN: ${{ secrets.NUGET_API_TOKEN }}

docs:
uses: ./.github/workflows/docs.yml
Expand All @@ -22,3 +24,6 @@ jobs:
deploy: true
environment: stable
version: ${{ needs.release.outputs.version }}
secrets:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: true
type: string
secrets:
nuget_api_key:
NUGET_API_TOKEN:
required: true
outputs:
version:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_SOURCE: ${{ inputs.nuget_source }}
NUGET_API_KEY: ${{ secrets.nuget_api_key }}
NUGET_API_TOKEN: ${{ secrets.NUGET_API_TOKEN }}
MAPPERLY_ENVIRONMENT: ${{ inputs.environment }}
- id: release-version
run: echo "version=${{ env.RELEASE_VERSION }}" >> "$GITHUB_OUTPUT"
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: test

on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
pull_request:
branches:
- '**'
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ plugins:
- - "@semantic-release/exec"
- verifyReleaseCmd: "echo RELEASE_VERSION=\"${nextRelease.version}\" >> $GITHUB_ENV"
prepareCmd: "RELEASE_NOTES=\"${nextRelease.notes}\" RELEASE_VERSION=\"${nextRelease.version}\" ./build/package.sh"
publishCmd: "dotnet nuget push './artifacts/*.nupkg' --source $NUGET_SOURCE --api-key $NUGET_API_KEY"
publishCmd: "dotnet nuget push './artifacts/*.nupkg' --source $NUGET_SOURCE --api-key $NUGET_API_TOKEN"

0 comments on commit 3bf7bba

Please sign in to comment.