-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Replace releaser and circleci with release please
- Loading branch information
Showing
18 changed files
with
207 additions
and
102 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Quality control | ||
description: 'Run quality control checks' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Run tests against chart | ||
shell: bash | ||
run: make test | ||
|
||
- name: Ensure golden files are up-to-date | ||
shell: bash | ||
run: | | ||
make update-golden-files | ||
[[ -z $(git status --porcelain) ]] |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish Chart | ||
description: 'Publish to gh-pages-backed chart repository' | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run. If so no package will be published.' | ||
required: true | ||
token: | ||
description: 'The GitHub token used to upload artifacts to the published release' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
path: helm-repo | ||
|
||
- name: Determine chart version | ||
shell: bash | ||
id: version | ||
run: | | ||
version=$(helm show chart . | awk '/version/ { print $2 }') | ||
echo "CHART_VERSION=$version" >> "$GITHUB_OUTPUT" | ||
echo "ARTIFACT=ld-relay-$version.tgz" >> "$GITHUB_OUTPUT" | ||
- name: Package the helm chart | ||
shell: bash | ||
run: make package | ||
|
||
- name: Generate updated index.yaml | ||
shell: bash | ||
run: helm repo index . --url https://launchdarkly.github.io/ld-relay-helm --merge helm-repo/index.yaml | ||
|
||
- name: Move files into publishable directory | ||
shell: bash | ||
run: mv ${{ steps.version.outputs.ARTIFACT }} index.yaml helm-repo | ||
|
||
- name: Publish to GitHub pages | ||
if: ${{ inputs.dry_run == 'false' }} | ||
uses: launchdarkly/gh-actions/actions/[email protected] | ||
with: | ||
docs_path: helm-repo | ||
github_token: ${{ inputs.token }} | ||
|
||
- name: Attach published chart to release | ||
if: ${{ inputs.dry_run == 'false' }} | ||
shell: bash | ||
run: gh release upload ${{ steps.version.outputs.CHART_VERSION }} helm-repo/${{ steps.version.outputs.ARTIFACT }} --clobber | ||
env: | ||
GH_TOKEN: ${{ inputs.token }} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Quality control | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**.md' # Do not need to run CI for markdown changes. | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: azure/[email protected] | ||
|
||
- name: Run quality control checks | ||
uses: ./.github/actions/ci |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Lint PR title | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
lint-pr-title: | ||
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run? If so no package will be published.' | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest | ||
# Needed to get tokens during publishing. | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: azure/[email protected] | ||
|
||
- name: Run quality control checks | ||
uses: ./.github/actions/ci | ||
|
||
- uses: ./.github/actions/publish | ||
with: | ||
dry_run: ${{ inputs.dry_run }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Run Release Please | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
release-package: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # Needed if using OIDC to get release secrets. | ||
contents: write # Contents and pull-requests are for release-please to make releases. | ||
pull-requests: write | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
command: manifest | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
default-branch: main | ||
|
||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
with: | ||
fetch-depth: 0 # If you only need the current version keep this. | ||
|
||
- uses: azure/[email protected] | ||
if: ${{ steps.release.outputs.releases_created }} | ||
|
||
- name: Run quality control checks | ||
if: ${{ steps.release.outputs.releases_created }} | ||
uses: ./.github/actions/ci | ||
|
||
- uses: ./.github/actions/publish | ||
if: ${{ steps.release.outputs.releases_created }} | ||
with: | ||
dry_run: false | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Happen once per day at 1:30 AM | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
sdk-close-stale: | ||
uses: launchdarkly/gh-actions/.github/workflows/sdk-stale.yml@main |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "3.3.0" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"packages": { | ||
".": { | ||
"release-type": "helm", | ||
"versioning": "default", | ||
"include-v-in-tag": false, | ||
"include-component-in-tag": false | ||
} | ||
} | ||
} |