Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
push:
tags:
- v[0-9].[0-9]+.[0-9]+
workflow_dispatch:
inputs:
release-tag:
description: Release tag, for example v1.2.3
required: true
type: string
pre-release:
description: Pre-release
required: false
type: boolean
default: false

concurrency:
group: release-${{ github.head_ref || github.run_id }}
Expand All @@ -15,22 +26,36 @@ 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 }}
Comment thread
yejseo01 marked this conversation as resolved.
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version-file: 'go.mod'
- name: Select GoReleaser config
id: goreleaser-config
env:
PRE_RELEASE: ${{ inputs['pre-release'] || false }}
run: |
if [ "$PRE_RELEASE" = "true" ]; then
echo "config=.goreleaser.prerelease.yaml" >> "$GITHUB_OUTPUT"
else
echo "config=.goreleaser.yaml" >> "$GITHUB_OUTPUT"
fi
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
args: release --clean --config ${{ steps.goreleaser-config.outputs.config }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ inputs['release-tag'] || github.ref_name }}
57 changes: 57 additions & 0 deletions .goreleaser.prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
Comment thread
yejseo01 marked this conversation as resolved.
Outdated
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
- go mod tidy

builds:
- id: containerd-shim-remoteproc-v1
main: ./cmd/containerd-shim-remoteproc-v1
binary: containerd-shim-remoteproc-v1
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- arm64
ldflags:
- -s -w
- -X github.com/arm/remoteproc-runtime/internal/version.Version={{.Version}}
- -X github.com/arm/remoteproc-runtime/internal/version.GitCommit={{.Commit}}
- id: remoteproc-runtime
main: ./cmd/remoteproc-runtime
binary: remoteproc-runtime
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- arm64
ldflags:
- -s -w
- -X github.com/arm/remoteproc-runtime/internal/version.Version={{.Version}}
- -X github.com/arm/remoteproc-runtime/internal/version.GitCommit={{.Commit}}

release:
prerelease: true

archives:
- formats: [tar.gz]
name_template: "remoteproc-runtime_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- docs/*

checksum:
name_template: "checksums.txt"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^refactor:"
Loading