Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish w/o nix #388

Merged
merged 1 commit into from
Feb 21, 2025
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
33 changes: 19 additions & 14 deletions .github/workflows/publish-edgedb-auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix develop --command just --version
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-auth") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-auth/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- working-directory: ./gel-auth
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
33 changes: 19 additions & 14 deletions .github/workflows/publish-edgedb-derive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix develop --command just --version
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-derive") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-derive/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- working-directory: ./gel-derive
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
33 changes: 19 additions & 14 deletions .github/workflows/publish-edgedb-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix develop --command cargo --version
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-errors") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-errors/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- working-directory: ./gel-errors
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
33 changes: 19 additions & 14 deletions .github/workflows/publish-edgedb-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix develop --command just --version
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-protocol") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-protocol/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- working-directory: ./gel-protocol
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
33 changes: 19 additions & 14 deletions .github/workflows/publish-edgedb-stream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix develop --command just --version
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-stream") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-stream/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- working-directory: ./gel-stream
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
34 changes: 19 additions & 15 deletions .github/workflows/publish-edgedb-tokio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,30 @@ jobs:
id-token: "write"
contents: "read"
steps:
# checkout and env setup
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Build the nix shell
run: nix build '.#devShells.x86_64-linux.default'
- name: checkout and env setup
uses: actions/checkout@v3

# test
- name: Test
run: nix develop --command just test
- name: Extract project name and version
run: |
set -x
PROJECT_NAME=$(echo $GITHUB_REF | sed -E 's|refs/tags/releases/([^/]+)/v.*|\1|')
VERSION=$(echo $GITHUB_REF | sed -E 's|.*/v(.*)|\1|')
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV

# verify that git tag matches cargo version
- run: |
set -x
cargo_version="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name=="gel-tokio") | .version')"
tag_version="${GITHUB_REF#refs/tags/releases/gel-tokio/v}"
test "$cargo_version" = "$tag_version"
| jq -r '.packages[] | select(.name==$PROJECT_NAME) | .version')"
test "$cargo_version" = "$VERSION"

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

# publish
- working-directory: ./gel-tokio
- working-directory: ./${{ env.PROJECT_NAME }}
run: |
nix develop --command cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --token=${{ secrets.CARGO_REGISTRY_TOKEN }}
Loading