[db] Add select edge_count #1084 (#1087) #112
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: release | |
on: | |
push: | |
branches: [main] | |
paths: | |
- agdb/** | |
- agdb_api/** | |
- agdb_derive/** | |
- agdb_server/** | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo build --package agdb_derive --package agdb --package agdb_api --package agdb_server --all-features --release | |
new_version: | |
runs-on: ubuntu-latest | |
outputs: | |
new_version: ${{ steps.new_version.outputs.new_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: new_version | |
run: | | |
if [[ "$(git diff HEAD^ --name-only -- Version)" != "" ]]; then echo "new_version=$(cat Version)" >> $GITHUB_OUTPUT; fi | |
echo "New version: $(cat Version)" | |
release: | |
runs-on: ubuntu-latest | |
needs: [build, new_version] | |
if: needs.new_version.outputs.new_version != '' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git tag -a "v${{ needs.new_version.outputs.new_version }}" -m "Release version ${{ needs.new_version.outputs.new_version }}" | |
git push origin "v${{ needs.new_version.outputs.new_version }}" | |
- uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: v${{ needs.new_version.outputs.new_version }} | |
generate_release_notes: true | |
publish_cargo: | |
runs-on: ubuntu-latest | |
needs: [release, new_version] | |
if: needs.new_version.outputs.new_version != '' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: | | |
cargo publish --package agdb_derive --token ${CRATES_IO_TOKEN} | |
cargo publish --package agdb --token ${CRATES_IO_TOKEN} | |
cargo publish --package agdb_api --token ${CRATES_IO_TOKEN} | |
cargo publish --package agdb_server --token ${CRATES_IO_TOKEN} | |
env: | |
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
publish_npm: | |
runs-on: ubuntu-latest | |
needs: [release, new_version] | |
if: needs.new_version.outputs.new_version != '' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- working-directory: agdb_api/typescript | |
run: | | |
npm ci | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} |