Skip to content

Apply query_principal fix to 4.6.x (#1871) #163

Apply query_principal fix to 4.6.x (#1871)

Apply query_principal fix to 4.6.x (#1871) #163

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
create_related_repo_tags:
runs-on: ubuntu-latest
# Check if APP_ID has been set
if: vars.APP_ID
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
repositories: cedar-spec,cedar-integration-tests
- name: Create tag in cedar-spec
uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const tag = context.ref.replace('refs/tags/', '');
const version = tag.replace('v', '');
const [major, minor, _] = version.split('.');
const releaseBranch = `release/${major}.${minor}.x`;
await github.rest.git.createRef({
owner: context.repo.owner,
repo: 'cedar-spec',
ref: `refs/tags/${tag}`,
sha: (await github.rest.repos.getBranch({
owner: context.repo.owner,
repo: 'cedar-spec',
branch: releaseBranch
})).data.commit.sha
});
- name: Create tag in cedar-integration-tests
uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const tag = context.ref.replace('refs/tags/', '');
const version = tag.replace('v', '');
const [major, minor, _] = version.split('.');
const releaseBranch = `release/${major}.${minor}.x`;
await github.rest.git.createRef({
owner: context.repo.owner,
repo: 'cedar-integration-tests',
ref: `refs/tags/${tag}`,
sha: (await github.rest.repos.getBranch({
owner: context.repo.owner,
repo: 'cedar-integration-tests',
branch: releaseBranch
})).data.commit.sha
});
build_release_binaries:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-13
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update stable && rustup default stable
- name: Install protobuf (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install protobuf-compiler
- name: Install protobuf (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install protobuf
- name: Build release binaries
run: cargo build --release --all-features
- uses: actions/upload-artifact@v4
with:
name: cedar-${{matrix.target}}
path: ./target/release/cedar