Skip to content

Commit

Permalink
fix workflow: use --pre-release flag to package the pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed May 8, 2024
1 parent 0adcb03 commit 661ecdf
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
CARGO_TERM_COLOR: always
IS_PRE_RELEASE: contains(${{ github.ref_name }}, 'dev')

jobs:
build:
Expand Down Expand Up @@ -35,11 +36,17 @@ jobs:

- name: Build xtask
run: cargo build --package xtask --release
- name: Prepare and pack the client
run: |
cargo xtask prep-server --target ${{ matrix.target }} --release
cargo xtask package -o "witcherscript-ide-${{ github.ref_name }}-${{ matrix.target }}.vsix" --target ${{ matrix.code_target }}

- name: Prepare the server executable
run: cargo xtask prep-server --target ${{ matrix.target }} --release

- name: Package the extension (pre-release)
if: ${{ env.IS_PRE_RELEASE }}
run: cargo xtask package --pre-release -o "witcherscript-ide-${{ github.ref_name }}-${{ matrix.target }}.vsix" --target ${{ matrix.code_target }}
- name: Package the extension (main release)
if: ${{ !env.IS_PRE_RELEASE }}
run: cargo xtask package -o "witcherscript-ide-${{ github.ref_name }}-${{ matrix.target }}.vsix" --target ${{ matrix.code_target }}

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand All @@ -51,9 +58,7 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: build
if: success()
env:
IS_PRE_RELEASE: contains(${{ github.ref_name }}, 'dev')
if: success()

steps:
- name: Download artifacts
Expand Down

0 comments on commit 661ecdf

Please sign in to comment.