Skip to content

Commit e9cf9be

Browse files
authored
ci(release): added release CI to the project (#3)
* style(fmt): applied madara cargo fmt * ci * fix(ci): invalid local worflow path * fix(clippy) * ci(version): added explicit dep versioning * ci(env): env expose via action output * dep(rust): updated rust version to 1.85 * ci(rust): added needed rust components * ci(rust): moved rust setup to an action * ci(rust): added cache for clippy and build steps * fix(ci): invalid cargo hack command in build CI * ci(hack): removed cargo hack * ci(build): fixed compilation * ci(merge): testing merge queue * ci(tmp): getting feature check to run so I can add it to merge queue * ci(cache): moved to `setup-rust-toolchain` for handling caching * ci(merge): merge queue test * ci(merge): invalid merge queue job name * fix(ci) * ci(merge): test merge queue * ci(merge): test merge queue * ci(merge): merge queue works * ci(lint): added commit message lint * fix(ci): commitlint * fix(ci): commitlint * fix(ci): commitlint * fix(ci): commitlint * fix(ci): commitlint * fix(ci): commitlint * feat(docker): updated openrpc-testgen-runner dockerfile * ci(docker): testing nightly release action * ci(docker): fixed permissions * ci(docker): fixed tag * ci(docker): fix permissions * ci(docker): fix tag * ci(docker): fix tag * ci(docker): fix tag * ci(docker): tag extraction works * ci(docker): fix ghcr tag * ci(docker): attestation * ci(docker): attestation * ci(docker): nightly release works * ci(queue): testing merge queue * ci(commit): fix commitlint * ci(queue): merge queue works * ci(lint): added commitlint to merge queue * fix(gas): updated l1 gas prices * ci(release): testing release pipeline * fix(ci): invalid workflow file name * fix(ci): unclosed sequence * style(prettier) * ci(release): testing release pipeline * ci(release): testing release pipeline * ci(release): testing release pipeline * ci(release): testing release pipeline * fix(ci): invalid container url * fix(ci): missing tag names * fix(ci): missing tag names * fix(ci): missing tag names * fix(ci): missing tag names * ci(docker): better caching * ci(merge): test merge queue * ci(release): updated release action * ci(merge): test merge queue * fix(ci): missing pull request name in merge queue * fix(ci): removed commitlint from merge queue * fix(merge): missing registry info * fix(docker): docker cache needs buildx * fix(docker): invalid context * fix(docker): issue with `.dockerignore` * fix(docker): invalid context * fix(docker): invalid context * fix(docker): invalid context * ci(merge): test merge queue * ci(merge): test merge queue * ci(merge): test merge queue * fix(ci): missing `nightly` version identifier * fix(comments) * fix(ci): merge queue works * ci(docker): testing release * ci(docker): testing release * ci(docker): testing release * ci(docker): testing release * ci(docker): testing release * fix(ci): getting nightly tag on release build * ci(release): release pipeline is ready
1 parent 48d4446 commit e9cf9be

File tree

222 files changed

+5072
-11869
lines changed

Some content is hidden

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

222 files changed

+5072
-11869
lines changed

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.dockerignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# will have compiled files and executables
22
**/target/
33

4-
# Scarb
5-
**/Scarb.lock
6-
74
# vscode
85
**/.vscode/
96

@@ -13,7 +10,6 @@
1310
# Docker
1411
**/Dockerfile
1512

16-
1713
# Ignores
1814
**/.gitignore
1915
**/.dockerignore
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-action.json
2+
name: Action - Setup Rust
3+
description: Sets up the Rust environment with a configurable toolchain
4+
5+
inputs:
6+
rust-version:
7+
description: Rust version to set up
8+
required: true
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Rust toolchain
17+
uses: actions-rust-lang/setup-rust-toolchain@v1
18+
with:
19+
toolchain: ${{ inputs.rust-version }}
20+
components: cargo, clippy, rustfmt
21+
22+
- name: Rust version
23+
shell: bash
24+
run: rustc --version

.github/workflows/build.yaml

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

.github/workflows/fmt.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
2+
name: Workflow - Pull Request Main (merge)
3+
4+
on:
5+
workflow_dispatch:
6+
merge_group:
7+
8+
env:
9+
RUST_VERSION: 1.85
10+
NODE_VERSION: 22
11+
REGISTRY: ghcr.io
12+
13+
jobs:
14+
env-expose:
15+
if: github.event.pull_request.draft == false
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: echo "Exposing env vars..."
19+
outputs:
20+
rust-version: ${{ env.RUST_VERSION }}
21+
node-version: ${{ env.NODE_VERSION }}
22+
registry: ${{ env.REGISTRY }}
23+
24+
build-cargo:
25+
needs: env-expose
26+
uses: ./.github/workflows/task-features.yaml
27+
with:
28+
rust-version: ${{ needs.env-expose.outputs.rust-version }}
29+
secrets: inherit
30+
31+
build-nightly:
32+
needs: [env-expose, build-cargo]
33+
uses: ./.github/workflows/task-build-nightly.yaml
34+
with:
35+
registry: ${{ needs.env-expose.outputs.registry }}
36+
image-name: openrpc-testgen-runner
37+
image-file: ./runner.dockerfile
38+
permissions:
39+
contents: read
40+
packages: write
41+
attestations: write
42+
id-token: write
43+
secrets: inherit
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
2+
name: Workflow - Pull Request Main
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
RUST_VERSION: 1.85
11+
NODE_VERSION: 22
12+
REGISTRY: ghcr.io
13+
14+
permissions:
15+
contents: read
16+
packages: write
17+
attestations: write
18+
id-token: write
19+
20+
jobs:
21+
env-expose:
22+
if: github.event.pull_request.draft == false
23+
runs-on: ubuntu-latest
24+
steps:
25+
- run: echo "Exposing env vars..."
26+
outputs:
27+
rust-version: ${{ env.RUST_VERSION }}
28+
node-version: ${{ env.NODE_VERSION }}
29+
registry: ${{ env.REGISTRY }}
30+
31+
lint-cargo:
32+
needs: env-expose
33+
uses: ./.github/workflows/task-lint-cargo.yaml
34+
with:
35+
rust-version: ${{ needs.env-expose.outputs.rust-version }}
36+
secrets: inherit
37+
38+
lint-prettier:
39+
needs: env-expose
40+
uses: ./.github/workflows/task-lint-prettier.yaml
41+
with:
42+
node-version: ${{ needs.env-expose.outputs.node-version }}
43+
secrets: inherit
44+
45+
lint-commit:
46+
needs: env-expose
47+
uses: ./.github/workflows/task-lint-commit.yaml
48+
with:
49+
node-version: ${{ needs.env-expose.outputs.node-version }}
50+
commit: ${{ github.event.pull_request.title }}
51+
secrets: inherit
52+
53+
build-cargo:
54+
needs: lint-prettier
55+
uses: ./.github/workflows/task-build-cargo.yaml
56+
with:
57+
rust-version: ${{ needs.env-expose.outputs.rust-version }}
58+
secrets: inherit
59+
60+
# Stub for the build queue
61+
build-nightly:
62+
needs: build-cargo
63+
uses: ./.github/workflows/task-do-nothing.yaml

.github/workflows/prettier.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
2+
name: Task - Build Project
3+
4+
on:
5+
workflow_dispatch:
6+
workflow_call:
7+
inputs:
8+
rust-version:
9+
description: Rust version used for building
10+
required: true
11+
type: string
12+
13+
jobs:
14+
build-cargo:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Rust toolchain
21+
uses: ./.github/actions/setup-rust
22+
with:
23+
rust-version: ${{ inputs.rust-version }}
24+
25+
- name: Build workspace
26+
run: |
27+
cargo build --all --all-features
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
2+
name: Task - Build And Publish Nightly Docker Image
3+
4+
on:
5+
workflow_dispatch:
6+
workflow_call:
7+
inputs:
8+
registry:
9+
description: Container registry domain
10+
required: true
11+
type: string
12+
image-name:
13+
description: Name for the Docker image
14+
required: true
15+
type: string
16+
image-file:
17+
description: Dockerfile used to build the image
18+
required: true
19+
type: string
20+
21+
permissions:
22+
contents: read
23+
packages: write
24+
attestations: write
25+
id-token: write
26+
27+
jobs:
28+
build-nightly:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Tags
36+
id: tag
37+
run: |
38+
IMAGE="${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image-name }}"
39+
SHA=$(git rev-parse --short "$GITHUB_SHA")
40+
NIGHTLY="$IMAGE:nightly"
41+
NIGHTLY_SHA="$IMAGE:nightly-$SHA"
42+
43+
echo "nightly=$NIGHTLY" >> $GITHUB_OUTPUT
44+
echo "nightly-sha=$NIGHTLY_SHA" >> $GITHUB_OUTPUT
45+
46+
- name: Log in to the Container registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ${{ inputs.registry }}
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Set up Docker Buildx
54+
uses: docker/setup-buildx-action@v3
55+
56+
- name: Build and push Docker image
57+
id: push
58+
uses: docker/build-push-action@v6
59+
with:
60+
context: .
61+
push: true
62+
file: ${{ inputs.image-file }}
63+
tags: |
64+
${{ steps.tag.outputs.nightly }}
65+
${{ steps.tag.outputs.nightly-sha }}
66+
cache-from: type=gha
67+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)