diff --git a/.github/workflows/pull.yaml b/.github/workflows/build.yaml similarity index 92% rename from .github/workflows/pull.yaml rename to .github/workflows/build.yaml index 8229f2a..a10367a 100644 --- a/.github/workflows/pull.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,9 @@ name: Lint & Build the model on: push: + branches: + - '*' + - '!main' pull_request: jobs: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..09f76b6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: Release OpenAPI Spec + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: necko-actions/setup-smithy@0e280f9054dbc6f23406e98235c5e18f1d2e4dd7 # v1 + with: + version: "1.40.0" + - name: Build OpenAPI Spec + run: smithy build model/ + - name: Release + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + with: + files: build/smithy/source/openapi/Registry.openapi.json