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

fix: 🐛 fixed failing release workflow #304

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
- "patch"
default: "patch"

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -25,22 +22,31 @@ jobs:
ref: "main"
fetch-depth: 0

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- uses: actions/setup-node@v4
with:
node-version: 16

- name: NPM Setup
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN

- name: Git Setup
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- name: Install Dependencies
run: npm ci

- name: Release
run: npm run release.ci -- ${{github.event.inputs.releaseType}}
run: npm run release.${{ github.event.inputs.releaseType }}
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }}
14 changes: 12 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"git": {
"requireBranch": "main",
"commitMessage": "chore: release v${version}"
"commitMessage": "chore: release v${version}",
"commit": true,
"tag": true,
"push": true,
"requireCleanWorkingDir": true
},
"github": {
"release": true
"release": true,
"tokenRef": "PUSH_TOKEN",
"comments": {
"submit": true,
"issue": ":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
"pr": ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
}
},
"npm": {
"publish": true
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multiple-cucumber-html-reporter",
"version": "3.4.0",
"version": "3.5.0",
"description": "Generate beautiful Cucumber.js reports for multiple instances (browsers / devices)",
"keywords": [
"cucumber",
Expand All @@ -13,11 +13,11 @@
"main": "lib/generate-report.js",
"license": "MIT",
"scripts": {
"release": "release-it --github.release",
"release.ci": "npm run release -- --ci --npm.skipChecks --no-git.requireCleanWorkingDir",
"release.patch": "npm run release -- patch",
"release.minor": "npm run release -- minor",
"release.major": "npm run release -- major",
"release": "release-it",
"release.ci": "npm run release -- --ci",
"release.patch": "npm run release.ci -- patch",
"release.minor": "npm run release.ci -- minor",
"release.major": "npm run release.ci -- major",
"test": "node ./test/test.js",
"unit.test": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
"unit.test.coverage": "JASMINE_CONFIG_PATH=test/unit/jasmine.json nyc jasmine"
Expand Down