Skip to content

Commit

Permalink
release: v1.1.0-rc.2 (#542)
Browse files Browse the repository at this point in the history
Release the 2nd release candidate of `v1.1.0`.
Adds support for automatic tagging of submodules (i.e `./instrument`)
upon publishing releases.
  • Loading branch information
RomainMuller authored Feb 14, 2025
1 parent 631f236 commit ef28ad5
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
conventional-commits:
- type: Maintenance work
nouns: [chore, doc, docs, release]
labels: [conventional-commit/chore]
- type: New feature
nouns: [feat]
labels: [conventional-commit/feat]
- type: Bug fix
nouns: [fix]
labels: [conventional-commit/fix]
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ updates:
GitHub Actions:
applies-to: version-updates
dependency-type: production
labels:
- dependencies

- package-ecosystem: pip
directory: /.github/actions/codecov-cli
Expand All @@ -20,3 +22,5 @@ updates:
Python Dependencies:
applies-to: version-updates
dependency-type: development
labels:
- dependencies
15 changes: 15 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
changelog:
exclude:
labels:
- conventional-commit/chore
- dependencies
categories:
- title: '🚀 Features'
labels:
- conventional-commit/feat
- title: '🐛 Bug Fixes'
labels:
- conventional-commit/fix
- title: '🔧 Maintenance'
labels:
- '*'
21 changes: 21 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR Labeler
on:
pull_request:
types: [opened, edited, reopened]

permissions: read-all

jobs:
update-labels:
name: Update PR labels
runs-on: ubuntu-latest
permissions:
pull-requests: write # Needed to update labels
steps:
- name: Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Assign Labels
uses: mauroalderete/action-assign-labels@671a4ca2da0f900464c58b8b5540a1e07133e915 # v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
conventional-commits: .github/conventional-commits.yml
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
push:
branches: [main]
paths: [internal/version/version.go]
release:
types: [published]

permissions: read-all

jobs:
validate:
if: github.event_name != 'release'
name: Validate Release
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -64,3 +67,58 @@ jobs:
gh release create '${{ steps.version.outputs.tag }}' --draft --generate-notes --target='${{ github.sha }}' --title='${{ steps.version.outputs.tag }}' ${{ contains(steps.version.outputs.tag, '-') && '--prerelease' || '' }}
env:
GH_TOKEN: ${{ github.token }}

release:
if: github.event_name == 'release'
name: Tag Release
runs-on: ubuntu-latest
permissions:
contents: write # To be able to create new tags
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.event.release.target_commitish }}
- name: Setup go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
with:
go-version: oldstable
cache-dependency-path: '**/go.mod'
- name: Configure git
env:
AUTHOR_NAME: ${{ github.event.release.author.name || 'Github Actions' }}
AUTHOR_EMAIL: ${{ github.event.release.author.email || '[email protected]' }}
run: |-
git config --global user.name "${AUTHOR_NAME}"
git config --global user.email "${AUTHOR_EMAIL}"
- name: Tag all submodules
env:
EVENT_TAG: ${{ github.event.release.tag_name }}
run: |-
for gomod in $(find . -iname go.mod -not -path '*/_*'); do
dir=$(dirname "${gomod}")
mod=$(go -C "${dir}" list -m)
case "${mod}" in
github.com/DataDog/orchestrion)
# This is the main module, the release already tagged it
continue
;;
github.com/DataDog/orchestrion/*)
# This is a submodule, we'll publish it if the prefix matches the directory name
echo "Found sub-module: ${mod} in ${gomod}"
suffix="${mod#'github.com/DataDog/orchestrion/'}"
if [ "${suffix}" != "${dir#'./'}" ]; then
echo "-> Ignoring submodule with mismatched directory path and suffix: ${dir#'./'} != ${suffix}"
continue
fi
tag="${suffix}/${EVENT_TAG}"
echo "-> Adding required submodule tag: ${tag}"
git tag -m "${EVENT_TAG}" "${tag}"
git push origin "${tag}"
;;
*)
# This is not a submodule, we'll skip it
echo "-> Ignorning non-submodule: ${mod} in ${gomod}"
;;
esac
done
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "runtime/debug"

const (
// tag specifies the current release tag. It needs to be manually updated.
tag = "v1.1.0-rc.1"
tag = "v1.1.0-rc.2"
devSuffix = "+devel"
)

Expand Down
2 changes: 1 addition & 1 deletion samples/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/DataDog/orchestrion/samples
module github.com/DataDog/orchestrion/_samples

go 1.22.5

Expand Down

0 comments on commit ef28ad5

Please sign in to comment.