Skip to content

Commit 69172fe

Browse files
committed
build(repo): Change release tooling
1 parent 8bd867a commit 69172fe

File tree

46 files changed

+1036
-1073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1036
-1073
lines changed

.cargo/config.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ protocol = "sparse"
77
linker = "aarch64-linux-gnu-gcc"
88

99
[profile.profiling]
10-
inherits = "release"
1110
debug = 1
11+
inherits = "release"
1212

1313
[profile.ci]
14-
inherits = "dev"
14+
codegen-units = 32
1515
debug = 0
16-
opt-level = 0
1716
debug-assertions = true
18-
codegen-units = 32
1917
incremental = true
20-
rpath = false
18+
inherits = "dev"
2119
lto = false
22-
panic = 'unwind'
20+
opt-level = 0
2321
overflow-checks = true
22+
panic = 'unwind'
23+
rpath = false
2424

2525
[net]
2626
git-fetch-with-cli = true

.clippy.toml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
allow-print-in-tests = true
1+
allow-dbg-in-tests = true
22
allow-expect-in-tests = true
3+
allow-print-in-tests = true
34
allow-unwrap-in-tests = true
4-
allow-dbg-in-tests = true
5-
disallowed-methods = [
6-
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
7-
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
8-
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
9-
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
10-
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
11-
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
12-
]
135
disallowed-macros = [
14-
# https://github.com/FuelLabs/fuel-core/issues/1327
15-
# https://docs.rs/log/latest/log/#macros
16-
{ reason = "Use tracing instead of log", path = "tracing::log::trace" },
17-
{ reason = "Use tracing instead of log", path = "tracing::log::debug" },
18-
{ reason = "Use tracing instead of log", path = "tracing::log::info" },
19-
{ reason = "Use tracing instead of log", path = "tracing::log::warn" },
20-
{ reason = "Use tracing instead of log", path = "tracing::log::error" },
21-
{ reason = "Use tracing instead of log", path = "tracing::log::log" },
22-
{ reason = "Use tracing instead of log", path = "tracing::log::log_enabled" },
23-
{ reason = "Use tracing instead of log", path = "log::trace" },
24-
{ reason = "Use tracing instead of log", path = "log::debug" },
25-
{ reason = "Use tracing instead of log", path = "log::info" },
26-
{ reason = "Use tracing instead of log", path = "log::warn" },
27-
{ reason = "Use tracing instead of log", path = "log::error" },
28-
{ reason = "Use tracing instead of log", path = "log::log" },
29-
{ reason = "Use tracing instead of log", path = "log::log_enabled" },
6+
# https://github.com/FuelLabs/fuel-core/issues/1327
7+
# https://docs.rs/log/latest/log/#macros
8+
{ reason = "Use tracing instead of log", path = "log::debug" },
9+
{ reason = "Use tracing instead of log", path = "log::error" },
10+
{ reason = "Use tracing instead of log", path = "log::info" },
11+
{ reason = "Use tracing instead of log", path = "log::log" },
12+
{ reason = "Use tracing instead of log", path = "log::log_enabled" },
13+
{ reason = "Use tracing instead of log", path = "log::trace" },
14+
{ reason = "Use tracing instead of log", path = "log::warn" },
15+
{ reason = "Use tracing instead of log", path = "tracing::log::debug" },
16+
{ reason = "Use tracing instead of log", path = "tracing::log::error" },
17+
{ reason = "Use tracing instead of log", path = "tracing::log::info" },
18+
{ reason = "Use tracing instead of log", path = "tracing::log::log" },
19+
{ reason = "Use tracing instead of log", path = "tracing::log::log_enabled" },
20+
{ reason = "Use tracing instead of log", path = "tracing::log::trace" },
21+
{ reason = "Use tracing instead of log", path = "tracing::log::warn" },
22+
]
23+
disallowed-methods = [
24+
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
25+
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
26+
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
27+
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
28+
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
29+
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
3030
]

.github/actions/setup-node/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ runs:
77
- name: Install Node.js
88
uses: actions/setup-node@v4
99
with:
10-
node-version: 20
10+
node-version: 22.11.0
1111
- uses: pnpm/action-setup@v4
1212
name: Install pnpm
1313
with:
14-
version: 9
14+
version: 10.0.0
1515
run_install: true
1616
- name: Get pnpm store directory
1717
shell: bash

.github/actions/setup-rust/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ runs:
4545

4646
- uses: taiki-e/cache-cargo-install-action@v2
4747
with:
48-
tool: cargo-sort@1.0.9
48+
tool: taplo-cli@0.9.3
4949

5050
- uses: taiki-e/cache-cargo-install-action@v2
5151
with:

.github/workflows/ci.yaml

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -330,37 +330,8 @@ jobs:
330330
rustup target add ${{ matrix.platform.target }}
331331
cargo build --release --locked --target ${{ matrix.platform.target }} --package ${{ matrix.package }}
332332
333-
# - name: Strip binaries
334-
# run: ./scripts/strip-binary.sh "${{ matrix.platform.target }}"
335-
336-
# - name: Set Artifact Name
337-
# id: artifact-name
338-
# shell: bash
339-
# run: |
340-
# echo "value=${{ matrix.package }}-${{ matrix.platform.os_name }}" >> $GITHUB_OUTPUT
341-
342-
# - name: Package as archive
343-
# shell: bash
344-
# run: |
345-
# cd target/${{ matrix.platform.target }}/release
346-
# tar czvf ../../../${{ steps.artifact-name.outputs.value }}.tar.gz ${{ matrix.package }}
347-
# cd -
348-
349-
# - name: Publish release artifacts
350-
# uses: actions/upload-artifact@v4
351-
# if: >-
352-
# (github.event_name == 'push' &&
353-
# github.ref == 'refs/heads/main' &&
354-
# contains(github.event.head_commit.message, 'ci(release): Preparing')) ||
355-
# github.event_name == 'workflow_dispatch'
356-
# with:
357-
# name: ${{ steps.artifact-name.outputs.value }}
358-
# path: ${{ matrix.package }}-*
359-
# if-no-files-found: error
360-
# retention-days: 30
361-
362333
release:
363-
name: Create Release with Knope
334+
name: Create Release
364335
if: >-
365336
(github.event_name == 'push' &&
366337
github.ref == 'refs/heads/main' &&
@@ -377,22 +348,3 @@ jobs:
377348
steps:
378349
- name: Checkout Repository
379350
uses: actions/checkout@v4
380-
381-
# - name: Download Artifacts
382-
# uses: actions/download-artifact@v4
383-
# with:
384-
# path: artifacts
385-
# merge-multiple: true
386-
387-
# - name: List Artifacts
388-
# run: ls -R artifacts
389-
390-
- name: Run Knope Action
391-
uses: knope-dev/action@v2.1.0
392-
with:
393-
github-token: ${{ secrets.GITHUB_TOKEN }}
394-
395-
- name: Knope Release
396-
run: knope release
397-
env:
398-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/prepare_release.yaml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/publish_release.yaml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/release-plz.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
env:
13+
RUST_VERSION: 1.81.0
14+
15+
jobs:
16+
# Release unpublished packages.
17+
release-plz-release:
18+
name: Release-plz release
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Install Rust
29+
uses: ./.github/actions/setup-rust
30+
with:
31+
toolchain: ${{ env.RUST_VERSION }}
32+
target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
33+
34+
- name: Run release-plz
35+
uses: release-plz/action@v0.5
36+
with:
37+
command: release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
41+
42+
# Create a PR with the new versions and changelog, preparing the next release.
43+
release-plz-pr:
44+
name: Release-plz PR
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: write
48+
pull-requests: write
49+
concurrency:
50+
group: release-plz-${{ github.ref }}
51+
cancel-in-progress: false
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Install Rust
59+
uses: ./.github/actions/setup-rust
60+
with:
61+
toolchain: ${{ env.RUST_VERSION }}
62+
target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
63+
64+
- name: Run release-plz
65+
uses: release-plz/action@v0.5
66+
with:
67+
command: release-pr
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)