diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index ec217b1..16b53cc 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -1,61 +1,61 @@ -name: Create Release - -on: - push: - branches: - - main - paths: - - 'package.json' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '20.8.0' - - - name: Install Dependencies - run: npm install - - - name: Build the Project - run: npm run build:patch - - - name: Get the version - id: get_version - run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV - - - name: Copy Files to docs - run: npm run copy-release - - - name: Commit changes - run: | - git config --global user.name 'github-actions' - git config --global user.email 'github-actions@github.com' - git add docs - git commit -m "Update docs for version ${{ env.VERSION }}" - git push origin main - - - 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 }} - draft: false - prerelease: false - - - name: Upload Release Asset ZIP - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./release/Bionic_Reading_Epub_Converter_WebApp_v${{ env.VERSION }}.zip - asset_name: Bionic_Reading_Epub_Converter_WebApp_v${{ env.VERSION }}.zip - asset_content_type: application/zip +name: Create Release + +on: + push: + branches: + - main + paths: + - 'package.json' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20.8.0' + + - name: Install Dependencies + run: npm install + + - name: Build the Project + run: npm run build:patch + + - name: Get the version + id: get_version + run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV + + - name: Copy Files to docs + run: npm run copy-release + + - name: Commit changes + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + git add docs + git commit -m "Update docs for version ${{ env.VERSION }}" + git push origin main + + - 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 }} + draft: false + prerelease: false + + - name: Upload Release Asset ZIP + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./release/Bionic_Reading_Epub_Converter_WebApp_v${{ env.VERSION }}.zip + asset_name: Bionic_Reading_Epub_Converter_WebApp_v${{ env.VERSION }}.zip + asset_content_type: application/zip