Skip to content

Commit

Permalink
ci: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 committed Nov 2, 2024
1 parent 7e8b72c commit 6c696c8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ on:
release:
types: [published]

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
Test:
uses: ./.github/workflows/test.yaml
Expand All @@ -34,7 +28,7 @@ jobs:
node-version: lts/*
registry-url: 'https://registry.npmjs.org/'

- name: Get release version
- name: Get Release Version
id: get_version
run: |
VERSION="${{ github.event.release.tag_name }}"
Expand All @@ -44,7 +38,7 @@ jobs:
echo "release_version=${VERSION#v}" >> $GITHUB_ENV
fi
- name: Update version in Package.json
- name: Update Version in Package.json
run: |
npm version ${{ env.release_version }} --no-git-tag-version
git config user.name "github-actions[bot]"
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
with:
node-version: ${{matrix.node-version}}

- name: Run
- name: Pre-Run
run: |
npm install --package-lock-only
npm install --ignore-scripts
npm run build
- name: Run Tests and Lint
run: |
npm run lint
npm run test
Expand All @@ -42,14 +45,25 @@ jobs:
package-lock.json
./lib
Release-Drafer:
"Release Drafter":
runs-on: ubuntu-latest
needs: Build
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Draft Release
- name: Draft Release (Develop)
if: github.ref == 'refs/heads/develop'
uses: release-drafter/release-drafter@v6
with:
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Draft Release
if: github.ref != 'refs/heads/develop'
uses: release-drafter/release-drafter@v6
with:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6c696c8

Please sign in to comment.