From 5fe9467be041ac4be6b458d2c1271bd0f77bf160 Mon Sep 17 00:00:00 2001 From: Daniel Loomb Date: Sun, 4 Jun 2023 16:16:23 -0700 Subject: [PATCH] Update publish.yml. Re-enable KONG --- .github/workflows/kong.yml | 16 ++++++------ .github/workflows/publish.yml | 49 +++-------------------------------- 2 files changed, 12 insertions(+), 53 deletions(-) diff --git a/.github/workflows/kong.yml b/.github/workflows/kong.yml index a8ce3be..63591b3 100644 --- a/.github/workflows/kong.yml +++ b/.github/workflows/kong.yml @@ -1,13 +1,13 @@ name: KONG -# on: -# workflow_dispatch: -# schedule: -# - cron: "0 0/4 * * *" -# pull_request: -# branches: [main] -# push: -# branches: [main] +on: + workflow_dispatch: + schedule: + - cron: "0 0/4 * * *" + pull_request: + branches: [main] + push: + branches: [main] env: test_api_key: ${{ secrets.KONG_SERVER_SDK_KEY }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 258c11d..3011fda 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,54 +7,13 @@ on: types: - closed -env: - public_repo: ${{ secrets.PUBLIC_SDK_REPO }} - jobs: publish: + if: | + github.event.pull_request.merged == true && + startsWith(github.head_ref, 'releases/') runs-on: ubuntu-latest steps: - uses: statsig-io/statsig-publish-sdk-action@v1.2 with: - gh-token: ${{ secrets.GITHUB_TOKEN }} - - # - name: Get Title - # id: get-title - # run: | - # input="${{ github.event.pull_request.title }}"; \ - # remove="\[release\] "; \ - # echo title="${input#$remove}" >> "$GITHUB_OUTPUT" - - # - name: Get Version - # id: get-version - # run: | - # input="${{ steps.get-title.outputs.title }}"; \ - # echo title="${input%% *}" >> "$GITHUB_OUTPUT" - - # - name: Push to Public - # run: | - # git remote add public https://github.com/statsig-io/rust-sdk.git - # git push public main - - # - uses: avakar/tag-and-release@v1 - # with: - # tag_name: ${{ steps.get-version.outputs.title }} - # release_name: ${{ steps.get-title.outputs.title }} - # body: ${{ github.event.pull_request.body }} - # draft: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # build: - # if: "contains(github.event.head_commit.message, '[release]')" - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v3 - - # - name: Set up Rust - # uses: actions/setup-rust@v1 - - # - name: Build Library - # run: cargo build --release + gh-token: ${{ secrets.KONG_FINE_GRAINED_REPO_PAT }}