-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial release via semantic release 🎉
- Loading branch information
1 parent
38c5e08
commit 0f26075
Showing
30 changed files
with
11,309 additions
and
183 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
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,43 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
working-dir: | ||
required: true | ||
type: string | ||
outputs: | ||
release-version: | ||
value: ${{ jobs.prepare-release.outputs.version }} | ||
release-notes: | ||
value: ${{ jobs.prepare-release.outputs.notes }} | ||
|
||
jobs: | ||
prepare-release: | ||
name: 🛫 Prepare release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.prepare-release.outputs.version }} | ||
notes: ${{ steps.prepare-release.outputs.notes }} | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v2 | ||
- name: 🏗 Setup node env | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
cache-dependency-path: package-lock.json | ||
- name: 👨🏻💻 Install dependencies | ||
run: npm install | ||
- name: 🛫 Prepare Release | ||
id: prepare-release | ||
working-directory: ${{ inputs.working-dir }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
npx semantic-release-plus | ||
version=$(cat release/version.txt) | ||
notes=$(cat release/notes.md) | ||
notes="${notes//'%'/'%25'}" | ||
notes="${notes//$'\n'/'%0A'}" | ||
notes="${notes//$'\r'/'%0D'}" | ||
echo "::set-output name=version::$version" | ||
echo "::set-output name=notes::$notes" |
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,49 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
service-name: | ||
required: true | ||
type: string | ||
version: | ||
required: true | ||
type: string | ||
change-notes: | ||
required: true | ||
type: string | ||
license-artifact-name: | ||
required: false | ||
type: string | ||
license-artifact-path: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
release: | ||
name: 🎉 Release | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v2 | ||
- name: 📦 Download license artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.license-artifact-name }} | ||
path: ${{ inputs.license-artifact-path }} | ||
- name: 🏷 Tag repository | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/tags/${{ inputs.service-name }}-v${{ inputs.version }}', | ||
sha: context.sha | ||
}) | ||
- name: 🚀 Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ inputs.change-notes }} | ||
fail_on_unmatched_files: false | ||
files: ${{ inputs.license-artifact-path }}/* | ||
tag_name: ${{ inputs.service-name }}-v${{ inputs.version }} |
Oops, something went wrong.