-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into smuu/lunar-boot-dnsaddr
- Loading branch information
Showing
408 changed files
with
19,526 additions
and
12,899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
name: CI and Release | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '**' | ||
release: | ||
types: [published] | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
# Friendly description to be shown in the UI instead of 'name' | ||
description: "Semver type of new version (major / minor / patch)" | ||
# Input has to be provided for the workflow to run | ||
run-on-tag: | ||
description: 'Tag for release' | ||
required: true | ||
type: choice | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
# set up go version for use through pipelines, setting | ||
|
@@ -54,15 +50,15 @@ jobs: | |
# Dockerfile Linting | ||
hadolint: | ||
uses: celestiaorg/.github/.github/workflows/[email protected].3 # yamllint disable-line rule:line-length | ||
uses: celestiaorg/.github/.github/workflows/[email protected].5 # yamllint disable-line rule:line-length | ||
with: | ||
dockerfile: Dockerfile | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: celestiaorg/.github/.github/actions/[email protected].3 | ||
- uses: celestiaorg/.github/.github/actions/[email protected].5 | ||
|
||
markdown-lint: | ||
name: Markdown Lint | ||
|
@@ -82,41 +78,31 @@ jobs: | |
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
|
||
# If this was a workflow dispatch event, we need to generate and push a tag | ||
# for goreleaser to grab | ||
version_bump: | ||
needs: [hadolint, yamllint, markdown-lint, go-ci, setup] | ||
runs-on: ubuntu-latest | ||
permissions: "write-all" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Bump version and push tag | ||
# Placing the if condition here is a workaround for needing to block | ||
# on this step during workflow dispatch events but the step not | ||
# needing to run on tags. If we had the if condition on the full | ||
# version_bump section, it would skip and not run, which would result | ||
# in goreleaser not running either. | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: ${{ inputs.version }} | ||
release_branches: ${{ needs.setup.outputs.branch }} | ||
|
||
# Generate the release with goreleaser to include pre-built binaries | ||
goreleaser: | ||
needs: [version_bump, setup] | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event_name == 'workflow_dispatch' || | ||
github.event_name == 'release' | ||
github.event_name == 'release' || | ||
github.event_name == 'workflow_dispatch' | ||
permissions: "write-all" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: git fetch --force --tags | ||
|
||
- name: Set LATEST_TAG for release | ||
if: github.event_name == 'release' | ||
run: echo "LATEST_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
|
||
- name: Set LATEST_TAG for workflow_dispatch | ||
if: github.event_name == 'workflow_dispatch' | ||
run: echo "LATEST_TAG=${{ inputs.run-on-tag }}" >> $GITHUB_ENV | ||
|
||
- name: Checkout a given tag | ||
if: github.event_name == 'workflow_dispatch' | ||
run: git checkout ${{ inputs.run-on-tag }} | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
|
@@ -137,17 +123,37 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | ||
GORELEASER_CURRENT_TAG: ${{ env.LATEST_TAG }} | ||
|
||
upload-docs: | ||
needs: goreleaser | ||
if: github.event_name == 'release' | ||
needs: [setup] | ||
if: | | ||
github.event_name == 'release' || | ||
github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: git fetch --force --tags | ||
|
||
- name: Set LATEST_TAG for release | ||
if: github.event_name == 'release' | ||
run: echo "LATEST_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
|
||
- name: Set LATEST_TAG for workflow_dispatch | ||
if: github.event_name == 'workflow_dispatch' | ||
run: echo "LATEST_TAG=${{ inputs.run-on-tag }}" >> $GITHUB_ENV | ||
|
||
- name: Checkout a given tag | ||
if: github.event_name == 'workflow_dispatch' | ||
run: git checkout ${{ inputs.run-on-tag }} | ||
|
||
- run: | | ||
make openrpc-gen > openrpc.json | ||
gh release upload ${{github.event.release.tag_name}} openrpc.json | ||
gh release upload "$LATEST_TAG" openrpc.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.