Skip to content

Commit

Permalink
feat: adjust semantic release workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
Callin Mullaney committed Sep 4, 2024
1 parent 2bdf7cd commit 20a1fd8
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/semantic-release.yml
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

0 comments on commit 20a1fd8

Please sign in to comment.