From b571f87744de859bd7a99552654dd053bc114a91 Mon Sep 17 00:00:00 2001 From: Tim Pietrusky Date: Thu, 18 Apr 2024 21:51:27 +0200 Subject: [PATCH] fix: create the archive after running semantic-release --- .github/workflows/publish.yml | 28 ++++++++++++++++++---------- .releaserc | 15 +-------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2c119e4..e67619d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,21 +26,29 @@ jobs: with: node-version-file: ".nvmrc" - - name: Setup 7zip - run: | - sudo apt-get update - sudo apt-get install -y p7zip-full - - name: Install dependencies run: npm install - - name: Fix auto-fixable eslint issues - run: npm run eslint -- --fix - - name: Update the ToC in the README.md run: npx markdown-toc README.md -i - - name: Semantic Release - run: npx semantic-release + - name: Build app + run: npm run build + + - name: Semantic release + uses: codfish/semantic-release-action@v3 + with: + additional-packages: | + ['@semantic-release/git', '@semantic-release/changelog'] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create archive + run: /usr/bin/7za a app.7z ./out/* ./package.json ./captain.md ./CHANGELOG.md + + - name: Add archive to release + uses: softprops/action-gh-release@v1 + with: + files: app.7z env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc b/.releaserc index dd6792a..ad89c42 100644 --- a/.releaserc +++ b/.releaserc @@ -17,12 +17,6 @@ "changelogFile": "CHANGELOG.md" } ], - [ - "@semantic-release/exec", - { - "prepareCmd": "npm run build && /usr/bin/7za a app.7z ./out/*" - } - ], [ "@semantic-release/git", { @@ -34,14 +28,7 @@ } ], [ - "@semantic-release/github", - { - "assets": [ - { - "path": "app.7z" - } - ] - } + "@semantic-release/github" ] ] }