Skip to content

Commit

Permalink
💚 Fix CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco committed Feb 25, 2024
1 parent 90d61df commit 3330c0e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 19 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/publish-bolt-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Run lint
run: yarn lint

test:
test-and-publish:
needs: [clippy-lint, yarn-lint]
runs-on: ubuntu-latest

Expand Down Expand Up @@ -185,17 +185,22 @@ jobs:
if [ "${DRY_RUN}" = "true" ]; then
DRY_RUN_FLAG="--dry-run"
fi
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component-deserialize/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component-id/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/system/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/system-input/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/bolt-program/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-system/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-component/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=programs/world/Cargo.toml --token ${CRATES_TOKEN}
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/Cargo.toml --token ${CRATES_TOKEN}
if [ "${DRY_RUN}" = "true" ]; then
NO_VERIFY_FLAG="--no-verify"
fi
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component-deserialize/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/component-id/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/system/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/system-input/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/attribute/bolt-program/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/utils/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-system/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=programs/bolt-component/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=programs/world/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
cargo publish $DRY_RUN_FLAG --manifest-path=crates/bolt-lang/Cargo.toml --token ${CRATES_TOKEN} $NO_VERIFY_FLAG
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
DRY_RUN: ${{ env.DRY_RUN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-bolt-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ jobs:
- name: npm publish
run: |
npm install --only=dev
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
cd clients/bolt-sdk/ && yarn build && yarn lint:fix && cd ../../ && yarn lint:fix
cd clients/bolt-sdk/
npm install --only=dev
if [ "${DRY_RUN}" = "true" ]; then
echo "Running npm publish in dry-run mode"
npm publish --access public --dry-run
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ jobs:
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
DRY_RUN: ${{ env.DRY_RUN }}
publish-wrapper-npm-package:
name: Publish wrapper NPM packages
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ bolt-attribute-bolt-system = { path = "crates/bolt-lang/attribute/system", versi
bolt-attribute-bolt-system-input = { path = "crates/bolt-lang/attribute/system-input", version = "=0.0.2" }
bolt-attribute-bolt-component-deserialize = { path = "crates/bolt-lang/attribute/component-deserialize", version = "=0.0.2" }
bolt-attribute-bolt-component-id = { path = "crates/bolt-lang/attribute/component-id", version = "=0.0.2" }
bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.0.2" }
world = { path = "programs/world", features = ["cpi"], version = "=0.0.2"}
bolt-system = { path = "programs/bolt-system", features = ["cpi"], version = "=0.0.2"}
bolt-component = { path = "programs/bolt-component", features = ["cpi"], version = "=0.0.2"}

## External crates
anchor-lang = "0.29.0"
Expand Down
14 changes: 9 additions & 5 deletions crates/bolt-helpers/attribute/system-template/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[package]
name = "bolt-helpers-system-template"
version = "0.0.1"
edition = "2021"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[lib]
proc-macro = true

[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
syn = "1.0"
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true }

0 comments on commit 3330c0e

Please sign in to comment.