-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/private-registry
- Loading branch information
Showing
33 changed files
with
4,121 additions
and
116 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,26 +3,69 @@ on: | |
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tibdex/[email protected] | ||
id: get_installation_token | ||
## Build a release based on the release-please-config.json file | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
app_id: ${{ secrets.RELEASE_PLEASE_APP_ID }} | ||
installation_id: ${{ secrets.RELEASE_PLEASE_APP_INSTALLATION_ID }} | ||
private_key: ${{ secrets.RELEASE_PLEASE_APP_PRIVATE_KEY }} | ||
command: manifest | ||
|
||
- uses: google-github-actions/release-please-action@v3 | ||
## Build go binary and add it to the release | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Build go binaries | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
## Publish the release to npm | ||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Get commit author | ||
id: commit_author | ||
run: | | ||
author=$(gh pr list --search ${{ github.sha }} --state merged --json mergedBy --jq '.[0].mergedBy.login') | ||
echo "author=${author}" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- uses: actions/setup-node@v3 | ||
# This sets up the .npmrc file for publishing to npm | ||
with: | ||
release-type: go | ||
token: ${{ steps.get_installation_token.outputs.token }} | ||
bump-minor-pre-major: true | ||
package-name: release-please-action | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Run npm publish | ||
shell: bash | ||
run: | | ||
cd npm | ||
./publish.sh | ||
env: | ||
NPM_TOKEN: ${{ secrets[format('NPM_TOKEN_{0}', steps.commit_author.outputs.author)] || secrets.NPM_TOKEN }} | ||
OPTIC_TOKEN: ${{ secrets[format('OPTIC_TOKEN_{0}', steps.commit_author.outputs.author)] || secrets.OPTIC_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} |
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ Dockerfile.initium | |
initium_onmain.yaml | ||
initium_onbranch.yaml | ||
dist/ | ||
|
||
node_modules |
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,3 @@ | ||
{ | ||
".": "0.6.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,4 @@ | ||
MOCK1="value1" | ||
MOCK2="value2" | ||
MOCK3:"value3" | ||
MOCK4 "value4" |
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
Oops, something went wrong.