From c07250367d5639ffa82d5214760238c870fb0990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Sa=C4=9Flam?= Date: Fri, 24 Oct 2025 23:44:19 +0300 Subject: [PATCH 1/5] debug --- .github/workflows/release.yml | 46 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b16030e..b8a961d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,27 @@ jobs: runs-on: ubuntu-latest steps: - + - name: Check Team Membership + id: check_team + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_SECRET }} + TEAM_SLUG: 'reviewers' + ORG_NAME: 'paywallone' + run: | + ACTOR="${{ github.actor }}" + TEAM_MEMBERSHIP_RESPONSE=$(curl -s \ + -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_SLUG/memberships/$ACTOR") + echo "$TEAM_MEMBERSHIP_RESPONSE" + if echo "$TEAM_MEMBERSHIP_RESPONSE" | grep -q '"state": "active"'; then + echo "Actor $ACTOR is a member of the team." + echo "::set-output name=is_member::true" + else + echo "Actor $ACTOR is NOT a member of the team." + echo "::set-output name=is_member::false" + exit 1 + fi - name: Checkout repository uses: actions/checkout@v4 @@ -32,26 +52,4 @@ jobs: 7.0.x 8.0.x - - name: Get current version - id: get_version - run: | - VERSION=$(find . -name "*.csproj" -exec grep -oP '(?<=).*?(?=)' {} + | head -n 1) - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --configuration Release --no-restore - - - name: Pack - run: dotnet pack --configuration Release --no-build --output ./artifacts - - - name: Push to NuGet - run: | - dotnet nuget push ./artifacts/*.nupkg \ - --source https://api.nuget.org/v3/index.json \ - --api-key ${{ secrets.NUGET_API_KEY }} \ - --skip-duplicate - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} \ No newline at end of file + \ No newline at end of file From d1145750572b3be912ffa47ad7ba70afd0e412ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Sa=C4=9Flam?= Date: Fri, 24 Oct 2025 23:56:03 +0300 Subject: [PATCH 2/5] token added --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8a961d..1597c4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Check Team Membership id: check_team env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_SECRET }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TEAM_SLUG: 'reviewers' ORG_NAME: 'paywallone' run: | From 11f83762042dac149cb935d453029db84014cf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Sa=C4=9Flam?= Date: Sat, 25 Oct 2025 00:12:48 +0300 Subject: [PATCH 3/5] debug --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1597c4e..ecbb4fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Check Team Membership id: check_team env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_SECRET }} TEAM_SLUG: 'reviewers' ORG_NAME: 'paywallone' run: | @@ -30,7 +30,7 @@ jobs: TEAM_MEMBERSHIP_RESPONSE=$(curl -s \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_SLUG/memberships/$ACTOR") + "https://api.github.com/orgs/$ORG_NAME/teams/reviewers/memberships/$ACTOR") echo "$TEAM_MEMBERSHIP_RESPONSE" if echo "$TEAM_MEMBERSHIP_RESPONSE" | grep -q '"state": "active"'; then echo "Actor $ACTOR is a member of the team." From db293391ac177c13805f9662613db794f702fb11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Sa=C4=9Flam?= Date: Sat, 25 Oct 2025 00:13:47 +0300 Subject: [PATCH 4/5] debuf --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ecbb4fd..b8a961d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: TEAM_MEMBERSHIP_RESPONSE=$(curl -s \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/orgs/$ORG_NAME/teams/reviewers/memberships/$ACTOR") + "https://api.github.com/orgs/$ORG_NAME/teams/$TEAM_SLUG/memberships/$ACTOR") echo "$TEAM_MEMBERSHIP_RESPONSE" if echo "$TEAM_MEMBERSHIP_RESPONSE" | grep -q '"state": "active"'; then echo "Actor $ACTOR is a member of the team." From 03ae43b0a377f7f33a1738b89361cd5acfc6c367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Sa=C4=9Flam?= Date: Sat, 25 Oct 2025 00:15:09 +0300 Subject: [PATCH 5/5] debug --- .github/workflows/release.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8a961d..747ff49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,4 +52,26 @@ jobs: 7.0.x 8.0.x - \ No newline at end of file + - name: Get current version + id: get_version + run: | + VERSION=$(find . -name "*.csproj" -exec grep -oP '(?<=).*?(?=)' {} + | head -n 1) + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Pack + run: dotnet pack --configuration Release --no-build --output ./artifacts + + - name: Push to NuGet + run: | + dotnet nuget push ./artifacts/*.nupkg \ + --source https://api.nuget.org/v3/index.json \ + --api-key ${{ secrets.NUGET_API_KEY }} \ + --skip-duplicate + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} \ No newline at end of file