Skip to content

Commit

Permalink
Fix for CI to publish (#958)
Browse files Browse the repository at this point in the history
Fixed CI to publish. Added additional job before publishing to verify
that publishing will be successful.
Added instructions on how to verify publishing
  • Loading branch information
xgreenx authored Jan 27, 2023
1 parent ca32a5e commit 443acac
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,27 @@ jobs:
run: |
./.github/workflows/scripts/verify_chart_version.sh
publish-crates-check:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Publish crate check
uses: katyo/publish-crates@v2
with:
dry-run: true

publish-crates:
# Only do this job if publishing a release
needs:
- pre-publish-verifications
- publish-crates-check
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest

Expand All @@ -209,7 +225,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish crate
uses: katyo/publish-crates@v1
uses: katyo/publish-crates@v2
with:
publish-delay: 60000
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down Expand Up @@ -358,6 +374,7 @@ jobs:
- name: Build fuel-core
run: |
cross build --profile=release --target ${{ matrix.job.target }} --features "production" -p fuel-core-bin
cross build --profile=release --target ${{ matrix.job.target }} -p fuel-core-keygen
- name: Strip release binary linux x86_64
if: matrix.job.platform == 'linux'
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.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ $ ./target/debug/fuel-core run --poa-instant=false

#### Troubleshooting

##### Publishing

We use [`publish-crates`](https://github.com/katyo/publish-crates) action for automatic publishing of all crates.

If you have problems with publishing, you can troubleshoot it locally with [`act`](https://github.com/nektos/act).

```shell
act release -s GITHUB_TOKEN=<YOUR_GITHUB_TOKEN> -j publish-crates-check --container-architecture linux/amd64 --reuse
```

It requires GitHubToken to do request to the GitHub. You can create it
with [this](https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) instruction.

##### Outdated database

If you encounter an error such as
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile.aarch64-unknown-linux-gnu-clang
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main@sha256:b4f5bf74812f9bb65161

RUN dpkg --add-architecture arm64 && \
apt-get update && \
apt-get install --assume-yes clang-8 libclang-8-dev binutils-aarch64-linux-gnu protobuf-compiler
apt-get install --assume-yes clang-8 libclang-8-dev binutils-aarch64-linux-gnu protobuf-compiler zlib1g-dev
2 changes: 1 addition & 1 deletion crates/services/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = "0.16.1"
[dependencies]
anyhow = "1.0"
async-trait = "0.1.60"
fuel-core-services = { path = "../" }
fuel-core-services = { path = "..", version = "0.16.1" }
fuel-core-types = { path = "../../types", version = "0.16.1" }
futures = "0.3.25"
tokio = { version = "1.21", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license = "BUSL-1.1"
name = "fuel-core-trace"
publish = false
repository = "https://github.com/FuelLabs/fuel-core"
version = "0.0.1"
version = "0.16.1"

[dependencies]
ctor = "0.1"
Expand Down

0 comments on commit 443acac

Please sign in to comment.