-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adjust semantic release workflow config
- Loading branch information
Callin Mullaney
committed
Sep 4, 2024
1 parent
2bdf7cd
commit 20a1fd8
Showing
1 changed file
with
13 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,23 @@ | ||
name: Semantic Release on Merge | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
workflow_dispatch: | ||
branches: [main] | ||
jobs: | ||
release: | ||
name: Attempt Semantic Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
- name: Install | ||
run: npm install | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Add remote SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.DRUPAL_ORG_SSH_KEY }} | ||
config: ${{ secrets.SSH_CONFIG }} | ||
known_hosts: ${{ secrets.KNOWN_HOSTS }} | ||
- name: Sync release tags to Drupal.org Project | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
git remote add drupal-org '${{ secrets.DRUPAL_REPO_URL }}' | ||
git push drupal-org --tags | ||
git checkout main | ||
git push drupal-org main | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm run semantic-release |