Skip to content

Commit

Permalink
Trigger on release published, remove auth from other actions (#558)
Browse files Browse the repository at this point in the history
* Trigger on release published, remove auth from other actions

Signed-off-by: Merit <[email protected]>

* Add tag param

Signed-off-by: Merit <[email protected]>

* Update version

Signed-off-by: Merit <[email protected]>

---------

Signed-off-by: Merit <[email protected]>
  • Loading branch information
meritmalling authored Jul 11, 2024
1 parent 0072661 commit 021b609
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 30 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
with:
node-version: 18.x
cache: npm

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc



- name: Install dependencies
run: npm ci

Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/cl-create.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Create a changelog update
name: Changelog

on:
push:
tags:
- '@**'
- '**'
release:
types: [published]

jobs:
changelog:
Expand All @@ -25,11 +23,6 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Set tag variable
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Set variables from cl-config.yml
run: |
destinationRepo=$(yq e '.destinationRepo' cl-config.yml)
Expand All @@ -39,7 +32,7 @@ jobs:
echo "DESTINATION_DIRECTORY=${destinationDirectory}" >> $GITHUB_ENV

- name: Create a changelog update
run: npx changelog generate ${{ env.TAG_NAME }}
run: npx changelog generate tag ${{ github.event.release.tag_name }}
env:
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}

Expand All @@ -56,7 +49,7 @@ jobs:
source_file: temp/${{ env.FILE_NAME}}
destination_repo: ${{ env.DESTINATION_REPO }}
destination_folder: changelog/src/${{ env.DESTINATION_DIRECTORY }}
destination_branch_create: changelog/${{ env.TAG_NAME }}
destination_branch_create: changelog/${{ github.event.release.tag_name }}
user_email: ${{ github.actor }}
user_name: github-actions[bot]
commit_message: "Updating the changelog for ${{ env.TAG_NAME }}"
commit_message: "Updating the changelog for ${{ github.event.release.tag_name }}"
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ jobs:
node-version: 16.x
cache: 'npm'

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc

- name: Install Dependencies
run: npm ci

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ jobs:
with:
node-version: 16
cache: 'npm'

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc


- name: Install dependencies
run: npm ci

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"optionalDependencies": {
"@parcel/watcher-linux-x64-glibc": "^2.3.0",
"@rollup/rollup-linux-x64-gnu": "^4.8.0",
"@flatfile/changelog": "^0.0.3"
"@flatfile/changelog": "^1.0.0"

}
}

0 comments on commit 021b609

Please sign in to comment.