-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
027cd05
commit c3bf613
Showing
2 changed files
with
83 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Release | ||
|
||
on: | ||
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 | ||
|
||
- name: Fetching tags | ||
run: git fetch --tags -f || true | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3.6.0 | ||
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 | ||
|
||
- 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: Check linting | ||
run: yarn run lint | ||
|
||
- name: Generate Changelog | ||
uses: scottbrenner/generate-changelog-action@master | ||
id: generate_changelog | ||
env: | ||
REPO: ${{ github.repository }} | ||
|
||
- name: Check package version | ||
uses: technote-space/package-version-check-action@v1 | ||
|
||
- name: Make Package | ||
run: npm pack | ||
|
||
- name: Rename Pack | ||
run: mv *.tgz baileys-api.tgz | ||
|
||
- name: Create Release | ||
uses: meeDamian/github-release@2.0 | ||
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 |
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