Use fixed spec with bearer #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: ["main"] | |
paths-ignore: | |
- docs/* | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
prepare: | |
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Read versions from file(s) | |
id: read-versions | |
shell: bash | |
run: | | |
echo "spicedb-version=$(cat src/spicedb.version)" >> ${GITHUB_ENV} | |
echo "spicedb-version=$(cat src/spicedb.version)" >> ${GITHUB_OUTPUT} | |
echo "openapi-version=$(cat src/openapi.version)" >> ${GITHUB_OUTPUT} | |
- name: Create SpiceDB OpenAPI spec url | |
id: spicedb-openapi-url | |
shell: bash | |
# TODO use official spec again | |
# run: echo "url=https://raw.githubusercontent.com/authzed/authzed-go/refs/tags/${{ env.spicedb-version }}/proto/apidocs.swagger.json" >> ${GITHUB_OUTPUT} | |
#run: echo "url=https://raw.githubusercontent.com/holgerstolzenberg/authzed-go/refs/heads/feature/openapi-global-security-definition/proto/apidocs.swagger.json" >> ${GITHUB_OUTPUT} | |
run: echo "url=https://raw.githubusercontent.com/authzed/authzed-go/refs/heads/openapi-authentication-bearer/proto/apidocs.swagger.json" >> ${GITHUB_OUTPUT} | |
- name: Get next semver version | |
uses: reecetech/version-increment@2024.10.1 | |
id: next-artifact-version | |
with: | |
scheme: semver | |
increment: patch | |
outputs: | |
spicedb-version: ${{ steps.read-versions.outputs.spicedb-version }} | |
openapi-version: ${{ steps.read-versions.outputs.openapi-version }} | |
spicedb-openapi-url: ${{ steps.spicedb-openapi-url.outputs.url }} | |
next-artifact-version: ${{ steps.next-artifact-version.outputs.version }} | |
java-client: | |
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | |
needs: [prepare] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
java-version: [17, 21] | |
java-http-lib: [feign, resttemplate, webclient, restclient, okhttp-gson] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | |
- name: Create target Java artifact version | |
shell: bash | |
run: echo "JAVA_ARTIFACT_VERSION=${{ needs.prepare.outputs.next-artifact-version }}-${{ matrix.java-version }}-${{ needs.prepare.outputs.spicedb-version }}" >> ${GITHUB_ENV} | |
- name: "Run java client build / SpiceDB: ${{ env.SPICEDB_VERSION }} / Java: ${{ matrix.java-version}} / HTTP lib: ${{ matrix.java-http-lib }}" | |
uses: ./.github/actions/java-client | |
with: | |
spicedb-version: ${{ needs.prepare.outputs.spicedb-version }} | |
release-version: ${{ env.JAVA_ARTIFACT_VERSION }} | |
snapshot: true | |
openapi-spec: ${{ needs.prepare.outputs.spicedb-openapi-url }} | |
openapi-version: ${{ needs.prepare.outputs.openapi-version }} | |
- name: "Publish java client snapshot to GitHub packages / SpiceDB: ${{ env.SPICEDB_VERSION }} / Java: ${{ matrix.java-version }} / HTTP lib: ${{ matrix.java-http-lib }}" | |
uses: ./.github/actions/java-client-publish-snapshot | |
with: | |
gh-token: ${{ secrets.GITHUB_TOKEN }} | |
typescript-client: | |
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | |
needs: [prepare] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [21] | |
generator: [typescript, typescript-axios, typescript-fetch, typescript-angular] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | |
- name: Create target NPM artifact version | |
shell: bash | |
run: echo "NPM_ARTIFACT_VERSION=${{ needs.prepare.outputs.next-artifact-version }}-${{ matrix.node-version }}-${{ needs.prepare.outputs.spicedb-version }}" >> ${GITHUB_ENV} | |
- name: "Run typescript client build / SpiceDB: ${{ env.SPICEDB_VERSION }} / Node: ${{ matrix.node-version }} / Generator: ${{ matrix.generator }}" | |
uses: ./.github/actions/typescript-client | |
with: | |
spicedb-version: ${{ needs.prepare.outputs.spicedb-version }} | |
release-version: ${{ env.NPM_ARTIFACT_VERSION }} | |
generator: ${{ matrix.generator }} | |
gh-token: ${{ secrets.GITHUB_TOKEN }} | |
openapi-spec: ${{ needs.prepare.outputs.spicedb-openapi-url }} | |
openapi-version: ${{ needs.prepare.outputs.openapi-version }} | |
snapshot: true | |
- name: "Publish NPM client snapshot to GitHub packages / SpiceDB: ${{ env.SPICEDB_VERSION }} / Node: ${{ matrix.java-version }} / Generator: ${{ matrix.java-http-lib }}" | |
uses: ./.github/actions/typescript-client-publish-snapshot | |
with: | |
gh-token: ${{ secrets.GITHUB_TOKEN }} | |
generator: ${{ matrix.generator }} | |
python-client: | |
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | |
needs: [prepare] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: [3.13] | |
python-http-lib: [urllib3] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | |
- name: Create target Python artifact version | |
shell: bash | |
# TODO what is the proper snapshot version here -> 'dev'? | |
#run: echo "PYTHON_ARTIFACT_VERSION=${{ needs.prepare.outputs.next-artifact-version }}-${{ matrix.python-version }}-${{ needs.prepare.outputs.spicedb-version }}.dev" >> ${GITHUB_ENV} | |
run: echo "PYTHON_ARTIFACT_VERSION=${{ needs.prepare.outputs.next-artifact-version }}.dev" >> ${GITHUB_ENV} | |
- name: "Run python client build / SpiceDB: ${{ env.SPICEDB_VERSION }} / Python: ${{ matrix.python-version}} / HTTP lib: ${{ matrix.python-http-lib }}" | |
uses: ./.github/actions/python-client | |
with: | |
spicedb-version: ${{ needs.prepare.outputs.spicedb-version }} | |
release-version: ${{ env.PYTHON_ARTIFACT_VERSION }} | |
openapi-spec: ${{ needs.prepare.outputs.spicedb-openapi-url }} | |
openapi-version: ${{ needs.prepare.outputs.openapi-version }} |