Skip to content

Commit

Permalink
Update publish-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
huseyindeniz authored Dec 22, 2024
1 parent 7457ed7 commit 90986ff
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2


- name: extract package version
run: |
echo "::set-output name=VERSION::$(cat package.json | jq -r .version)"
- name: Build project
run: |
npm ci
Expand All @@ -37,21 +41,15 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:

- name: Get version from package.json
id: get_version
run: |
VERSION=$(jq -r .version < package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
tag_name: ${{ needs.build.outputs.VERSION }}
release_name: Release ${{ needs.build.outputs.VERSION }}
body: New release for commit ${{ github.sha }}.
draft: true
prerelease: true
Expand Down

0 comments on commit 90986ff

Please sign in to comment.