From 20a1fd8d184f6ebeb01176b96ca1f3eaafebcd66 Mon Sep 17 00:00:00 2001 From: Callin Mullaney <57088-callinmullaney@users.noreply.drupalcode.org> Date: Wed, 4 Sep 2024 09:02:44 -0500 Subject: [PATCH] feat: adjust semantic release workflow config --- .github/workflows/semantic-release.yml | 33 ++++++++++---------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 4a24fcf..3502820 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -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