Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
usfalami committed Jan 8, 2025
1 parent f1179ae commit 2216096
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- run: npm run build
- uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- run: npm run build
- uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ jobs:
- uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: extract version
- run: echo "version=$(node -p 'require("./package.json").version')" >>$GITHUB_OUTPUT
id: npmVer
run: echo "version=$(node -p 'require("./package.json").version')" >>$GITHUB_OUTPUT
outputs:
version: ${{ steps.npmVer.outputs.version }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: release
- run: gh release create "$version" --repo="$GITHUB_REPOSITORY" --target="$branch" --title="$version" --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branch: "${{ github.ref_name }}"
version: "v${{ needs.build.outputs.version }}"
run: gh release create "$version" --repo="$GITHUB_REPOSITORY" --target="$branch" --title="$version" --generate-notes
version: "v${{ needs.build.outputs.version }}"

0 comments on commit 2216096

Please sign in to comment.