Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,42 @@

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-public
name: Build and publish stytch package to NuGet
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Get version
id: version
run: |
VERSION=$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' Stytch.net/Stytch.net.csproj)
echo "release_tag=$VERSION" >> $GITHUB_OUTPUT

- name: Check for Stytch.net.csproj diff
id: diff
env:
BASE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
git fetch --depth=1 origin "$BASE_SHA"
if git diff --quiet "$BASE_SHA" "$HEAD_SHA" -- Stytch.net/Stytch.net.csproj; then
echo "diff=0" >> $GITHUB_OUTPUT
else
echo "diff=1" >> $GITHUB_OUTPUT
fi

- name: Publish to NuGet
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: |
dotnet pack -o ./build
dotnet nuget push ./build/*.nupkg --source "nuget.org" --skip-duplicate --api-key $NUGET_KEY

- name: Create release
if: steps.diff.outputs.diff != 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ steps.version.outputs.release_tag }}" --generate-notes

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@

jobs:
test-stytch:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-public
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Lint
run: dotnet format --verify-no-changes

- name: Build
run: dotnet build

- name: Test
run: dotnet test
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
PROJECT_SECRET: ${{ secrets.PROJECT_SECRET }}
B2B_PROJECT_ID: ${{ secrets.B2B_PROJECT_ID }}
B2B_PROJECT_SECRET: ${{ secrets.B2B_PROJECT_SECRET }}

- name: Pack
run: dotnet pack

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading