Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
pull_request:
branches: [ main ]
workflow_call:
inputs:
checkout-ref:
Comment thread
yejseo01 marked this conversation as resolved.
description: Git ref to check out when this workflow is called by another workflow.
Comment thread
muchzill4 marked this conversation as resolved.
required: false
type: string
default: ''

concurrency:
group: ci-${{ github.head_ref || github.run_id }}
Expand All @@ -17,6 +23,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}

- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
Expand Down Expand Up @@ -46,6 +54,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}

- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- v[0-9].[0-9]+.[0-9]+
workflow_dispatch:
inputs:
release-tag:
description: Release tag, for example v1.2.3 or v1.2.3-rc1
required: true
type: string

concurrency:
group: release-${{ github.head_ref || github.run_id }}
Expand All @@ -15,22 +21,26 @@ permissions:
jobs:
ci:
uses: ./.github/workflows/ci.yml
with:
checkout-ref: ${{ inputs['release-tag'] || github.ref }}
secrets: inherit

release:
needs: ci
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
ref: ${{ inputs['release-tag'] || github.ref }}
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version-file: 'go.mod'
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
args: release --clean --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ inputs['release-tag'] || github.ref_name }}
3 changes: 3 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ builds:
- -X github.com/arm/remoteproc-runtime/internal/version.Version={{.Version}}
- -X github.com/arm/remoteproc-runtime/internal/version.GitCommit={{.Commit}}

release:
prerelease: auto

archives:
- formats: [tar.gz]
name_template: "remoteproc-runtime_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
Expand Down
21 changes: 20 additions & 1 deletion docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ PRs must have semantic commit titles (enforced by GitHub Actions).

### Releases

Releases are automated using GoReleaser when a new tag is pushed:
Releases are automated using GoReleaser when a release tag is pushed:

```bash
# Create and push a new version tag
Expand All @@ -204,3 +204,22 @@ The release workflow will:
1. Build binaries for multiple platforms

1. Create a GitHub release with artifacts

You can also start the release from GitHub Actions:

1. Open the **Release** workflow.

1. Select **Run workflow**.

1. Enter the release tag, for example `v0.1.0` or `v0.1.0-rc1`.

To create a pre-release, use an `-rc<number>` tag:

```bash
git tag v0.1.0-rc1
git push origin v0.1.0-rc1
```

Then run the **Release** workflow with **release-tag** set to `v0.1.0-rc1`.
GoReleaser marks the GitHub release as a pre-release automatically from the
tag.
Loading