Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: DRY_RUN still creates release... #167

Open
actuarysailor opened this issue Jun 6, 2023 · 1 comment
Open

BUG: DRY_RUN still creates release... #167

actuarysailor opened this issue Jun 6, 2023 · 1 comment

Comments

@actuarysailor
Copy link

Describe the bug
Documentation says that passing a DRY_RUN of true will over-ride the configuration file and perform a dry run. I've tried specifying it as true and it still creates the tags.

Workflow
I can't upload my files, but I can paste them below...

Expected behavior
Should get a dry_run

Additional context
Running on GitHub Enterprise, but I don't think that makes a difference.

RELEASERC.JSON
{ "branches": [ { "name": "main" }, { "name": "pre/rc", "channel": "${name}", "prerelease": "rc" }, { "name": "beta", "channel": "${name}", "prerelease": true }, { "name": "alpha", "channel": "${name}", "prerelease": true } ], "ci": false, "plugins": [ [ "@semantic-release/commit-analyzer", { "preset": "conventionalcommits" } ], [ "@semantic-release/release-notes-generator", { "preset": "conventionalcommits" } ], [ "@semantic-release/github", { "successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:", "labels": false, "releasedLabels": false } ], [ "@semantic-release/changelog", { "changelogFile": "CHANGELOG.md", "changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file." } ], [ "@semantic-release/git", { "assets": [ "CHANGELOG.md" ], "message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } ] ] }

WORKFLOW.YAML
``
name: Release

on:
workflow_dispatch:
inputs:
dry_run:
description: 'When set to true it does not actually publish the version, but rather writes the info for the release to the agent output'
required: false
type: boolean
default: true
workflow_call:
inputs:
dry_run:
description: 'When set to true it does not actually publish the version, but rather writes the info for the release to the agent output'
required: false
type: boolean
default: true
secrets:
PAT_REPO_OWNER:
description: 'A token passed from the caller workflow that can write to protected branches'
required: true

permissions:

contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
# Skip running release workflow on forks
# Updated to be Actuarial Services for our GHE environment
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

  - name: Validate NPM is available
    run: 
      npm --version || sudo apt update && sudo apt install nodejs npm -y
    continue-on-error: true

  # - name: Setup Node.js
  #   uses: actions/setup-node@v3
  #   with:
  #     node-version: "lts/*"
  #     cache: 'npm'
  #     cache-dependency-path: '${{ github.workspace }}/package-lock.json'

  # - name: Install dependencies
  #   run: npm clean-install

  # - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
  #   run: npm audit signatures

  - name: Release
    uses: cycjimmy/semantic-release-action@v3
  #  persist-credentials: false
    env:
      GITHUB_TOKEN: ${{ secrets.PAT_REPO_OWNER }}
      # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
    with:
      dry_run: inputs.dry_run
      semantic_version: 18.0.0
      extra_plugins: |
        @semantic-release/changelog@6.0.0
        @semantic-release/git@10.0.0
        conventional-changelog-conventionalcommits@4.6.3

``

@lanceatcollibra
Copy link

Could you please format your issue properly so it's easier to debug? You have some syntax errors.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants