Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 36 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand All @@ -37,7 +37,7 @@ jobs:
name: Security Audits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand All @@ -53,7 +53,7 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

Expand All @@ -73,7 +73,7 @@ jobs:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 #2.0.0

Expand All @@ -82,7 +82,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') != true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand All @@ -98,7 +98,7 @@ jobs:
shell: bash

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
shell: bash

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.5.4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

Expand Down Expand Up @@ -286,3 +286,32 @@ jobs:
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp '^https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/v[0-9]+.[0-9]+.[0-9]+$' \
$IMAGE@$DIGEST

verify-version:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, audit, test, shellcheck]
steps:
Comment thread
SoulPancake marked this conversation as resolved.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Verify versions match
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
Comment thread
SoulPancake marked this conversation as resolved.
MANIFEST_VERSION=$(jq -r '.["."]' .release-please-manifest.json)

echo "Tag: $TAG_VERSION | Manifest: $MANIFEST_VERSION"

if [[ "$TAG_VERSION" != "$MANIFEST_VERSION" ]]; then
echo "ERROR: Tag version does not match manifest version"
exit 1
fi
echo "All versions verified: $TAG_VERSION"

undraft-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [verify-version, verification-with-slsa-verifier, verification-with-cosign]
permissions:
contents: write
uses: openfga/sdk-generator/.github/workflows/undraft-release.yml@main
Comment thread
SoulPancake marked this conversation as resolved.
Comment thread
SoulPancake marked this conversation as resolved.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ docker_manifests:
- openfga/cli:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64

release:
draft: true
github:
owner: openfga
name: cli
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/openfga/cli

go 1.25.7

toolchain go1.26.2
toolchain go1.26.3

require (
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
Expand All @@ -13,7 +13,7 @@ require (
github.com/nwidger/jsoncolor v0.3.2
github.com/oklog/ulid/v2 v2.1.1
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20
github.com/openfga/go-sdk v0.8.0
github.com/openfga/go-sdk v0.8.1
github.com/openfga/language/pkg/go v0.2.1
github.com/openfga/openfga v1.15.1
github.com/rung/go-safecast v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 h1:xdVG0EDz9Z9Uhd7YZ5OMN1F8tkAz/Dpgdjxd0cuTBJo=
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20/go.mod h1:XDX4qYNBUM2Rsa2AbKPh+oocZc2zgme+EF2fFC6amVU=
github.com/openfga/go-sdk v0.8.0 h1:xwjqxO1v3QU6Tzx5xu33jpOpurqJYxXPM2uiR2QsfCo=
github.com/openfga/go-sdk v0.8.0/go.mod h1:s5zZD4NFmf6yQa74iJEAwBZgHx4NaNzoOOVmA6YcY2M=
github.com/openfga/go-sdk v0.8.1 h1:3svW/ml9PsuMMqDkMl0B5j511rJ9EwVX1FA4n3q2Ks4=
github.com/openfga/go-sdk v0.8.1/go.mod h1:s5zZD4NFmf6yQa74iJEAwBZgHx4NaNzoOOVmA6YcY2M=
github.com/openfga/language/pkg/go v0.2.1 h1:nmVJTPfjvaJC2EWGcy8HrUyL15KkIfjjnmB3VFVeCts=
github.com/openfga/language/pkg/go v0.2.1/go.mod h1:wg+EuPmYIaM855F2uPygT1hJoWcoUxAoecgYC5akXsw=
github.com/openfga/openfga v1.15.1 h1:1CWQd0iwpO9iPf3QHM149NW4qg0gFeQo/y5mjJLmPUY=
Expand Down
2 changes: 2 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"$schema": "https://github.com/googleapis/release-please/main/schemas/config.json",
"release-type": "go",
"pull-request-title-pattern": "release: v${version}",
"draft": true,
"force-tag-creation": true,
Comment thread
SoulPancake marked this conversation as resolved.
"packages": {
".": {
"include-component-in-tag": false,
Expand Down