Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ci: automate the new release process #12096

Merged
merged 23 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d3f3d52
feat: ci: automate the new release process
galargh Jun 16, 2024
fbb7517
Merge remote-tracking branch 'origin/master' into ipdx/release-automa…
galargh Jun 21, 2024
c78b802
docs: document the usage and purpose of the release cmd
galargh Jun 21, 2024
f0abec8
docs: update the RELEASE_ISSUE_TEMPLATE to reflect the automation add…
galargh Jun 21, 2024
97fb595
fix: setting the prerelease checkbox in goreleaser
galargh Jun 21, 2024
e90f027
fix: when the release workflow is triggered automatically
galargh Jun 21, 2024
ba06784
fix: docker workflow triggers
galargh Jun 21, 2024
e960dfc
docs: update the release issue template
galargh Jun 21, 2024
46bc707
fix: go fmt and go mod tidy
galargh Jun 21, 2024
730f470
Merge remote-tracking branch 'origin/master' into ipdx/release-automa…
galargh Jun 26, 2024
2428f62
chore: update the release automation after initial testing
galargh Jun 26, 2024
2102091
docs: update README of the release tool
galargh Jun 26, 2024
253ab88
chore: fix go imports
galargh Jun 26, 2024
72254f8
fix: apply fixes from the testing branches
galargh Jun 27, 2024
2df032e
docs: update the release issue template
galargh Jun 27, 2024
438ecba
chore: resolve release automation todos
galargh Jun 27, 2024
86f67ea
feat: ci: remove gorelease, create drafts and automate release notes
galargh Jul 9, 2024
aad564f
chore: ci: allow using pat for tag creation during release
galargh Jul 15, 2024
1bda8d9
chore: docs: apply suggestions from code review
galargh Jul 15, 2024
1b9f812
Merge remote-tracking branch 'origin/master' into ipdx/release-automa…
galargh Jul 15, 2024
c1d8638
chore: ci: stop using the releases branch
galargh Jul 17, 2024
55d83f0
chore: ci: preserve release body
galargh Jul 17, 2024
914b17b
chore: ci: apply fixes discovered through testing in a fork
galargh Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ on:
push:
branches:
- master
- release/*
tags:
- v*
pull_request:
branches:
- master
- release/v*
- release/miner/v*
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
ref:
description: The GitHub ref (e.g. refs/tags/v1.0.0) to release
publish:
description: 'Publish the Docker image'
required: false
default: 'false'

defaults:
run:
Expand All @@ -24,7 +29,7 @@ permissions:

jobs:
docker:
name: Docker (${{ matrix.image }} / ${{ matrix.network }}) [publish=${{ (inputs.ref || github.ref) == 'refs/heads/master' || startsWith(inputs.ref || github.ref, 'refs/tags/') }}]
name: Docker (${{ matrix.image }} / ${{ matrix.network }}) [publish=${{ github.event.inputs.publish == 'true' || github.event_name != 'pull_request' }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -40,13 +45,13 @@ jobs:
- image: lotus
network: mainnet
env:
PUBLISH: ${{ github.ref == 'refs/heads/master' || startsWith(inputs.ref || github.ref, 'refs/tags/') }}
PUBLISH: ${{ github.event.inputs.publish == 'true' || github.event_name != 'pull_request' }}
steps:
- id: channel
env:
IS_MASTER: ${{ (inputs.ref || github.ref) == 'refs/heads/master' }}
IS_TAG: ${{ startsWith(inputs.ref || github.ref, 'refs/tags/') }}
IS_RC: ${{ contains(inputs.ref || github.ref, '-rc') }}
IS_MASTER: ${{ github.ref == 'refs/heads/master' }}
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/') }}
IS_RC: ${{ contains(github.ref, '-rc') }}
IS_SCHEDULED: ${{ github.event_name == 'schedule' }}
run: |
channel=''
Expand All @@ -67,12 +72,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
ref: ${{ inputs.ref || github.ref }}
- id: git
env:
REF: ${{ inputs.ref || github.ref }}
run: |
ref="${REF#refs/heads/}"
ref="${GITHUB_REF#refs/heads/}"
ref="${ref#refs/tags/}"
sha="$(git rev-parse --short HEAD)"
echo "ref=$ref" | tee -a "$GITHUB_OUTPUT"
Expand All @@ -86,7 +88,7 @@ jobs:
images: filecoin/${{ matrix.image }}
tags: |
type=raw,enable=${{ steps.channel.outputs.channel != '' }},value=${{ steps.channel.outputs.channel }}
type=raw,enable=${{ startsWith(inputs.ref || github.ref, 'refs/tags/') }},value=${{ steps.git.outputs.ref }}
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},value=${{ steps.git.outputs.ref }}
type=raw,value=${{ steps.git.outputs.sha }}
flavor: |
latest=false
Expand Down
Loading