Skip to content

Commit aa3695d

Browse files
committed
Merge branch 'release/v1.31.1' into streaming
# Conflicts: # CHANGELOG.md # build/openrpc/full.json # build/openrpc/gateway.json # build/openrpc/miner.json # build/openrpc/worker.json # build/version.go # cli/f3.go # documentation/en/cli-lotus-miner.md # documentation/en/cli-lotus-worker.md # documentation/en/cli-lotus.md # go.mod # go.sum # node/modules/actorevent.go
2 parents dee7f23 + b81f548 commit aa3695d

File tree

391 files changed

+20923
-14235
lines changed

Some content is hidden

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

391 files changed

+20923
-14235
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Create Release Issue
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
type:
7+
description: "What's the type of the release?"
8+
required: true
9+
type: choice
10+
options:
11+
- node
12+
- miner
13+
- both
14+
tag:
15+
description: "What's the tag of the release? (e.g., 1.30.1)"
16+
required: true
17+
level:
18+
description: "What's the level of the release?"
19+
required: true
20+
default: 'warning'
21+
type: choice
22+
options:
23+
- major
24+
- minor
25+
- patch
26+
network-upgrade:
27+
description: "What's the version of the network upgrade this release is related to? (e.g. 25)"
28+
required: false
29+
discussion-link:
30+
description: "What's a link to the GitHub Discussions topic for the network upgrade?"
31+
required: false
32+
changelog-link:
33+
description: "What's a link to the Lotus CHANGELOG entry for the network upgrade?"
34+
required: false
35+
rc1-date:
36+
description: "What's the expected shipping date for RC1?"
37+
required: false
38+
default: "TBD"
39+
stable-date:
40+
description: "What's the expected shipping date for the stable release?"
41+
required: false
42+
default: "TBD"
43+
44+
defaults:
45+
run:
46+
shell: bash
47+
48+
permissions:
49+
contents: read
50+
issues: write
51+
52+
jobs:
53+
create-issue:
54+
name: Create Release Issue
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: ./.github/actions/install-go
59+
- env:
60+
GITHUB_TOKEN: ${{ github.token }}
61+
run: |
62+
go run cmd/release/main.go create-issue \
63+
--create-on-github=true \
64+
--type "${{ github.event.inputs.type }}" \
65+
--tag "${{ github.event.inputs.tag }}" \
66+
--level "${{ github.event.inputs.level }}" \
67+
--network-upgrade "${{ github.event.inputs.network-upgrade }}" \
68+
--discussion-link "${{ github.event.inputs.discussion-link }}" \
69+
--changelog-link "${{ github.event.inputs.changelog-link }}" \
70+
--rc1-date "${{ github.event.inputs.rc1-date }}" \
71+
--stable-date "${{ github.event.inputs.stable-date }}" \
72+
--repo "filecoin-project/lotus"
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Dependency Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'go.mod'
7+
- 'go.sum'
8+
- '.github/workflows/dependency-check.yml'
9+
10+
jobs:
11+
dependency-check:
12+
runs-on: ubuntu-latest
13+
name: Dependency Check
14+
env:
15+
V0_PATTERN: 'v0\.0\.0-[0-9]{14}-[0-9a-f]{7,}(\s*(\/\/.*)?)?$'
16+
RELEASE_PATTERN: 'v[0-9]+\.[0-9]+\.[0-9]+(\+incompatible)?(\s*(\/\/.*)?)?$'
17+
IGNORE_PATTERN: 'dependency-check-ignore:\s'
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
name: Check out the repository
22+
with:
23+
submodules: 'recursive'
24+
- uses: ./.github/actions/install-go
25+
26+
- id: all
27+
name: Extract all dependencies from go.mod (include indirect dependencies and comments)
28+
run: |
29+
echo "dependencies<<EOF" >> $GITHUB_OUTPUT
30+
# `go list` isn't used because:
31+
# 1. it lists ALL the transitive dependencies, even those that are unused and don't make it to the go.mod file
32+
# 2. It doesn't extract the inline `dependency-check-ignore` comments.
33+
# Extract the lines from 'require (' to the first ')' including those lines in the go.mod file.
34+
sed -n '/require (/,/)/p' go.mod |
35+
36+
# Remove the 'require (' line.
37+
sed '/require (/d' |
38+
39+
# Remove the ')' line.
40+
sed '/^)/d' |
41+
42+
# Remove leading whitespace from each line.
43+
sed 's/^[[:space:]]*//' |
44+
45+
# Append the result to the file specified by the GITHUB_OUTPUT environment variable.
46+
tee -a $GITHUB_OUTPUT
47+
echo "EOF" >> $GITHUB_OUTPUT
48+
49+
- id: unreleased
50+
name: Find all dependencies that use prerelease versions (i.e., exclude vX.Y.Z and v0.0.0 versions)
51+
env:
52+
DEPENDENCIES: ${{ steps.all.outputs.dependencies }}
53+
run: |
54+
echo "dependencies<<EOF" >> $GITHUB_OUTPUT
55+
grep -Pv "$V0_PATTERN|$RELEASE_PATTERN" <<< "$DEPENDENCIES" | tee -a $GITHUB_OUTPUT
56+
echo "EOF" >> $GITHUB_OUTPUT
57+
58+
- id: unexplained
59+
name: Find all unreleased dependencies without a dependency-check-ignore comment
60+
env:
61+
DEPENDENCIES: ${{ steps.unreleased.outputs.dependencies }}
62+
run: |
63+
echo "dependencies<<EOF" >> $GITHUB_OUTPUT
64+
grep -Pv "$IGNORE_PATTERN" <<< "$DEPENDENCIES" | tee -a $GITHUB_OUTPUT
65+
echo "EOF" >> $GITHUB_OUTPUT
66+
67+
- id: v0check
68+
name: Check v0.0.0 dependencies for available tags
69+
run: |
70+
echo "tagged<<EOF" >> $GITHUB_OUTPUT
71+
grep -P "$V0_PATTERN" go.mod | grep -Pv "$IGNORE_PATTERN" | while read -r line; do
72+
dep=$(echo "$line" | cut -d' ' -f1)
73+
if [ ! -z "$(go list -m -versions $dep 2>/dev/null | awk 'NF>1')" ]; then
74+
echo "$dep"
75+
fi
76+
done | tee -a $GITHUB_OUTPUT
77+
echo "EOF" >> $GITHUB_OUTPUT
78+
79+
- if: steps.unexplained.outputs.dependencies != '' || steps.v0check.outputs.tagged != ''
80+
name: Throw if any unexplained dependencies exist
81+
env:
82+
MESSAGE: |
83+
Dependencies requiring attention found in this PR. Please follow the [dependency management conventions](https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#dependency-management).
84+
85+
${{ steps.unexplained.outputs.dependencies != '' && 'Unexplained unreleased dependencies:' || '' }}
86+
${{ steps.unexplained.outputs.dependencies }}
87+
88+
${{ steps.v0check.outputs.tagged != '' && 'Unexplained v0.0.0 dependencies with available tags:' || '' }}
89+
${{ steps.v0check.outputs.tagged }}
90+
run: |
91+
echo "::error::${MESSAGE//$'\n'/%0A}"
92+
exit 1

0 commit comments

Comments
 (0)