From 206037d948802eb580719f4b65023c80f9ac69bb Mon Sep 17 00:00:00 2001 From: jasonwilliams Date: Tue, 27 Jun 2023 16:07:11 +0100 Subject: [PATCH 1/5] create binaires for the releases --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3afa81b57d..3b1a04d407e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,3 +69,31 @@ jobs: publish_dir: ./dist destination_dir: playground github_token: ${{ secrets.GITHUB_TOKEN }} + + release-binaries: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + artifact_name: boa + asset_name: boa-linux-amd64 + - os: windows-latest + artifact_name: boa.exe + asset_name: boa-windows-amd64 + - os: macos-latest + artifact_name: boa + asset_name: boa-macos-amd64 + + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --release --locked + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/${{ matrix.artifact_name }} + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }} From 09a4142d70baf3b55fbf9e4f74b79b2cccace309 Mon Sep 17 00:00:00 2001 From: jasonwilliams Date: Wed, 5 Jul 2023 22:27:38 +0100 Subject: [PATCH 2/5] update from comments --- .github/workflows/release.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b1a04d407e..e08afdae329 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,29 +71,33 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} release-binaries: - name: Publish for ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Publish binaries strategy: + fail-fast: false matrix: + build: [linux, macos, win-msvc] include: - - os: ubuntu-latest - artifact_name: boa - asset_name: boa-linux-amd64 - - os: windows-latest - artifact_name: boa.exe - asset_name: boa-windows-amd64 - - os: macos-latest - artifact_name: boa - asset_name: boa-macos-amd64 - + - build: linux + os: ubuntu-20.04 + rust: stable + target: x86_64-unknown-linux-gnu + - build: macos + os: macos-latest + rust: stable + target: x86_64-apple-darwin + - build: win-msvc + os: windows-2019 + rust: stable + target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Build - run: cargo build --release --locked + run: cargo build --release --locked --bin boa - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/${{ matrix.artifact_name }} - asset_name: ${{ matrix.asset_name }} + file: target/release/${{ matrix.target }} + asset_name: ${{ matrix.target }} tag: ${{ github.ref }} From 476646ffa17315e64be568e7c2245cf54d7393ba Mon Sep 17 00:00:00 2001 From: jasonwilliams Date: Wed, 5 Jul 2023 22:42:55 +0100 Subject: [PATCH 3/5] cleaner asset name --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e08afdae329..bc036f989bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,14 +81,17 @@ jobs: os: ubuntu-20.04 rust: stable target: x86_64-unknown-linux-gnu + asset_name: boa-linux-amd64 - build: macos os: macos-latest rust: stable target: x86_64-apple-darwin + asset_name: boa-macos-amd64 - build: win-msvc os: windows-2019 rust: stable target: x86_64-pc-windows-msvc + asset_name: boa-windows-amd64 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -99,5 +102,5 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: target/release/${{ matrix.target }} - asset_name: ${{ matrix.target }} + asset_name: ${{ matrix.asset_name }} tag: ${{ github.ref }} From 0908c1a11e2745cda6688214c4c1029ee140e476 Mon Sep 17 00:00:00 2001 From: jasonwilliams Date: Wed, 5 Jul 2023 22:51:36 +0100 Subject: [PATCH 4/5] don't have prettier run against github workflows --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 391d5c907b9..6f86fe09e2a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ # Ignore artifacts: *.rs +*.yml target node_modules boa_engine/benches/bench_scripts/mini_js.js From 89ec8bceef7aec3a2c330fbed20a8fd9f77f106d Mon Sep 17 00:00:00 2001 From: Jason Williams <936006+jasonwilliams@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:56:00 +0100 Subject: [PATCH 5/5] Update .github/workflows/release.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Julián Espina --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc036f989bd..9cb41649c6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build - run: cargo build --release --locked --bin boa + run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: