Skip to content

Commit 39e26b6

Browse files
committed
docs: use semantic release (#50)
Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
1 parent 05d0bca commit 39e26b6

1 file changed

Lines changed: 22 additions & 51 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -199,62 +199,33 @@ jobs:
199199
git checkout ${RELEASE_BRANCH}
200200
fi
201201
202+
- name: Publish Semantic Release
203+
env:
204+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
205+
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}
206+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
207+
GIT_COMMITTER_NAME: ${{ secrets.GIT_USER_NAME }}
208+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
209+
if: ${{ !cancelled() && !failure() }}
210+
working-directory: contracts
211+
run: |
212+
FLAGS=""
213+
if [[ "${{ inputs.dry-run-enabled }}" == "true" ]]; then
214+
FLAGS="--dry-run"
215+
fi
216+
217+
npx semantic-release --no-sign ${FLAGS}
218+
219+
if [[ -d "dist" ]]; then
220+
echo "Dist dir has the following contents:"
221+
ls dist
222+
fi
223+
202224
- name: Pack tarball
203225
working-directory: contracts
204226
run: |
205227
npm pack
206228
207-
- name: Close the Milestone
208-
if: ${{ steps.version_parser.outputs.prerelease == '' }}
209-
id: milestone
210-
uses: step-security/close-milestone@b097272a7aaa0f5c40dc6bc671d45d35c5e85b51 # v2.2.1
211-
with:
212-
milestone_name: ${{ steps.version_parser.outputs.release }}
213-
env:
214-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215-
216-
- name: Create Release Notes
217-
if: ${{ steps.milestone.outputs.milestone_id != '' }}
218-
uses: step-security/release-notes-generator-action@796ee9c88dd2346ea1a5e9e85ca6cbd1e24e2e6a # v3.2.2
219-
env:
220-
FILENAME: ${{ env.RELEASE_NOTES_FILENAME }}
221-
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
222-
MILESTONE_NUMBER: ${{ steps.milestone.outputs.milestone_id }}
223-
224-
- name: Import GPG key
225-
id: gpg_importer
226-
uses: step-security/ghaction-import-gpg@69c854a83c7f79463f8bdf46772ab09826c560cd # v6.3.1
227-
with:
228-
gpg_private_key: ${{ secrets.GPG_KEY_CONTENTS }}
229-
passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
230-
git_config_global: true
231-
git_user_signingkey: true
232-
git_commit_gpgsign: true
233-
git_tag_gpgsign: false
234-
235-
- name: Commit and Tag
236-
uses: step-security/git-auto-commit-action@e2d505468267a3cb406af729d48d664de1f16393 # v6.0.2
237-
with:
238-
commit_author: ${{ steps.gpg_importer.outputs.name || vars.GIT_USER_NAME || 'release-automation' }} <${{ steps.gpg_importer.outputs.email || vars.GIT_USER_EMAIL || 'automation@users.noreply.github.com' }}>
239-
commit_message: 'chore(release): Bump versions for ${{ env.RELEASE_TAG }}'
240-
commit_options: '--no-verify --signoff'
241-
commit_user_name: ${{ steps.gpg_importer.outputs.name || vars.GIT_USER_NAME || 'release-automation' }}
242-
commit_user_email: ${{ steps.gpg_importer.outputs.email || vars.GIT_USER_EMAIL || 'automation@users.noreply.github.com' }}
243-
tagging_message: ${{ env.RELEASE_TAG }}
244-
245-
- name: Create Github Release (draft)
246-
uses: step-security/release-action@03a57407052f15d1537fd5469a6fbbc536aba326 # v1.20.0
247-
with:
248-
bodyFile: ${{ env.RELEASE_NOTES_FILENAME }}.md
249-
commit: ${{ env.RELEASE_BRANCH }}
250-
draft: true
251-
name: ${{ env.RELEASE_TAG }}
252-
omitBody: ${{ steps.milestone.outputs.milestone_id == '' }}
253-
prerelease: ${{ steps.version_parser.outputs.prerelease != '' }}
254-
tag: ${{ env.RELEASE_TAG }}
255-
token: ${{ secrets.GH_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
256-
257-
258229
- name: Verify Package
259230
working-directory: contracts
260231
run: |

0 commit comments

Comments
 (0)