From f7ac1d0ece628e1148920341a9fa045068ee8bad Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 12 Aug 2022 08:26:14 -0700 Subject: [PATCH] ci(artifacts): add msi to release artifacts These changes to the GitHub actions workflows will include an MSI installer in the artifacts that are uploaded at the end of each successful build, and also attach an MSI installer to a release when the job runs on a tag that creates a new release version. re #152 --- .github/dependabot.yml | 2 +- .github/workflows/windows.yaml | 10 ++++++++++ .goreleaser.yml | 2 +- justfile | 4 ++++ wix/main.wxs | 4 ++-- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 344a2d88..48cb2675 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,7 +13,7 @@ updates: - package-ecosystem: "cargo" directory: "/" schedule: - interval: "monthly" + interval: "weekly" assignees: - "LGUG2Z" commit-message: diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index ab04bc80..1b0c70b5 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -76,6 +76,10 @@ jobs: - name: Run a full build run: | cargo build --locked --release --target ${{ matrix.target }} + - name: Create MSI installer + run: | + cargo install cargo-wix + cargo wix -p komorebi --nocapture -I .\wix\main.wxs --target x86_64-pc-windows-msvc - name: Upload the built artifacts uses: actions/upload-artifact@v3 with: @@ -85,6 +89,7 @@ jobs: target/${{ matrix.target }}/release/komorebic.exe target/${{ matrix.target }}/release/komorebi.pdb target/${{ matrix.target }}/release/komorebic.pdb + target/wix/komorebi-*.msi retention-days: 7 - name: Generate changelog if: startsWith(github.ref, 'refs/tags/') @@ -101,3 +106,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SCOOP_TOKEN: ${{ secrets.SCOOP_TOKEN }} + - name: Add MSI to release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: "target/wix/komorebi-*.msi" diff --git a/.goreleaser.yml b/.goreleaser.yml index 23f20c27..508750b8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -42,4 +42,4 @@ checksum: name_template: checksums.txt changelog: - sort: asc \ No newline at end of file + sort: asc diff --git a/justfile b/justfile index e7a5a633..04592e53 100644 --- a/justfile +++ b/justfile @@ -8,6 +8,10 @@ fmt: cargo +nightly fmt cargo +stable clippy prettier --write README.md + prettier --write .goreleaser.yml + prettier --write .github/dependabot.yml + prettier --write .github/FUNDING.yml + prettier --write .github/workflows/windows.yaml install-komorebic: cargo +stable install --path komorebic --locked diff --git a/wix/main.wxs b/wix/main.wxs index e38859cc..969063f4 100644 --- a/wix/main.wxs +++ b/wix/main.wxs @@ -59,9 +59,9 @@ - + - +