-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix(ci): fixed changelog for workflow release
- Loading branch information
1 parent
adfe131
commit 9e06d47
Showing
1 changed file
with
61 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,79 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetching tags | ||
run: git fetch --tags -f || true | ||
- name: Fetching tags | ||
run: git fetch --tags -f || true | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version}} | ||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version}} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
run: yarn install | ||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Check linting | ||
run: yarn run lint | ||
- name: Check linting | ||
run: yarn run lint | ||
|
||
- name: Generate Changelog | ||
id: generate_changelog | ||
run: | | ||
yarn run changelog:last --silent | ||
changelog=$(yarn run changelog:last --silent) | ||
echo "changelog<<EOF" >> $GITHUB_OUTPUT | ||
echo "${changelog}" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Generate Changelog | ||
id: generate_changelog | ||
run: | | ||
changelog=$(yarn run changelog:last --silent) | ||
echo "changelog<<EOF" >> $GITHUB_OUTPUT | ||
echo "${changelog}" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Check package version | ||
uses: technote-space/package-version-check-action@v1 | ||
- name: Check package version | ||
uses: technote-space/package-version-check-action@v1 | ||
|
||
- name: Make Package | ||
run: npm pack | ||
- name: Make Package | ||
run: npm pack | ||
|
||
- name: Rename Pack | ||
run: mv *.tgz baileys-api.tgz | ||
- name: Rename Pack | ||
run: mv *.tgz baileys-api.tgz | ||
|
||
- name: Create Release | ||
uses: meeDamian/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
name: ${{ github.ref_name }} | ||
body: ${{ steps.generate_changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
files: > | ||
baileys-api.tgz | ||
gzip: folders | ||
allow_override: true | ||
- name: Create Release | ||
uses: meeDamian/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
name: ${{ github.ref_name }} | ||
body: ${{ steps.generate_changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
files: > | ||
baileys-api.tgz | ||
gzip: folders | ||
allow_override: true |