From 822d0019b8a6d47b9f320d6280f6151741c07566 Mon Sep 17 00:00:00 2001 From: Charlie Ozinga Date: Sun, 8 Nov 2020 01:08:55 -0700 Subject: [PATCH] fix: windows target --- .github/snippets/job-publish-versio.yml | 11 +++++++---- .github/snippets/steps-github-publish.yml | 2 +- .github/workflows/github-publish.yml | 9 ++++++--- .github/workflows/release.yml | 9 ++++++--- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/snippets/job-publish-versio.yml b/.github/snippets/job-publish-versio.yml index 14b6211..caaf01f 100644 --- a/.github/snippets/job-publish-versio.yml +++ b/.github/snippets/job-publish-versio.yml @@ -5,17 +5,20 @@ value: matrix: include: - os: ubuntu-latest - target: x86_64-unknown-linux-gnu + target: 'x86_64-unknown-linux-gnu' root: '.' rustflags: '-D warnings -C link-args=-s' + bin_name: 'versio' - os: macos-latest - target: x86_64-apple-darwin + target: 'x86_64-apple-darwin' root: '.' rustflags: '-D warnings' + bin_name: 'versio' - os: windows-latest - target: x86_64-pc-win32 + target: 'x86_64-pc-win32.exe' root: '.' rustflags: '-D warnings' + bin_name: 'versio.exe' if: SNIPPET_not-skip-ci runs-on: ${{ matrix.os }} steps: @@ -33,6 +36,6 @@ value: uses: actions/upload-release-asset@v1 with: upload_url: ${{ needs.github-publish.outputs.upload_url }} - asset_path: ./target/release/versio + asset_path: target/release/{{ matrix.bin_name }} asset_name: versio__${{ matrix.target }} asset_content_type: application/octet-stream diff --git a/.github/snippets/steps-github-publish.yml b/.github/snippets/steps-github-publish.yml index 543a241..64fe4e2 100644 --- a/.github/snippets/steps-github-publish.yml +++ b/.github/snippets/steps-github-publish.yml @@ -30,7 +30,7 @@ value: **MacOS:** download `versio__x86_64-apple-darwin`, copy to `versio` in your PATH. **GNU Linux 64:** download `versio__x86_64-unknown-linux-gnu`, copy to `versio` in your PATH. - **Windows:** download `versio__x86_64-pc-win32`, copy to `versio` in your %PATH. + **Windows:** download `versio__x86_64-pc-win32.exe`, copy to `versio.exe` in your %PATH. draft: true prerelease: false commitish: main diff --git a/.github/workflows/github-publish.yml b/.github/workflows/github-publish.yml index 7a4433e..e6e4120 100644 --- a/.github/workflows/github-publish.yml +++ b/.github/workflows/github-publish.yml @@ -100,7 +100,7 @@ jobs: with: tag_name: "${{ steps.find-version.outputs.version }}" release_name: "(TODO) RELEASE FOR ${{ steps.find-version.outputs.version }}" - body: "(TODO) SUMMARY\n- (TODO) FEATURE1\n\nNew to Versio? The [repository](https://github.com/chaaz/versio) is the best place to learn about Versio and what it can do. If you want to report a bug or request a feature, you can do so at our [Issues](https://github.com/chaaz/versio/issues) link, but we ask you first read the [Troubleshooting](https://github.com/chaaz/versio/blob/main/docs/troubleshooting.md) page learn about problems and their solutions.\n\nTo install, follow the instructions for your platform; some files might be zipped for improved download speed. For example, on MacOS you can do something like this (assuming `~/bin` exists and is in your PATH):\n\n```sh\ncurl -L https://github.com/chaaz/versio/releases/download/${{ steps.find-version.outputs.version }}/versio__x86_64-apple-darwin -o ~/bin/versio\nchmod +x ~/bin/versio\n```\n\n**MacOS:** download `versio__x86_64-apple-darwin`, copy to `versio` in your PATH.\n**GNU Linux 64:** download `versio__x86_64-unknown-linux-gnu`, copy to `versio` in your PATH.\n**Windows:** download `versio__x86_64-pc-win32`, copy to `versio` in your %PATH.\n" + body: "(TODO) SUMMARY\n- (TODO) FEATURE1\n\nNew to Versio? The [repository](https://github.com/chaaz/versio) is the best place to learn about Versio and what it can do. If you want to report a bug or request a feature, you can do so at our [Issues](https://github.com/chaaz/versio/issues) link, but we ask you first read the [Troubleshooting](https://github.com/chaaz/versio/blob/main/docs/troubleshooting.md) page learn about problems and their solutions.\n\nTo install, follow the instructions for your platform; some files might be zipped for improved download speed. For example, on MacOS you can do something like this (assuming `~/bin` exists and is in your PATH):\n\n```sh\ncurl -L https://github.com/chaaz/versio/releases/download/${{ steps.find-version.outputs.version }}/versio__x86_64-apple-darwin -o ~/bin/versio\nchmod +x ~/bin/versio\n```\n\n**MacOS:** download `versio__x86_64-apple-darwin`, copy to `versio` in your PATH.\n**GNU Linux 64:** download `versio__x86_64-unknown-linux-gnu`, copy to `versio` in your PATH.\n**Windows:** download `versio__x86_64-pc-win32.exe`, copy to `versio.exe` in your %PATH.\n" draft: true prerelease: false commitish: main @@ -113,14 +113,17 @@ jobs: target: x86_64-unknown-linux-gnu root: "." rustflags: "-D warnings -C link-args=-s" + bin_name: versio - os: macos-latest target: x86_64-apple-darwin root: "." rustflags: "-D warnings" + bin_name: versio - os: windows-latest - target: x86_64-pc-win32 + target: x86_64-pc-win32.exe root: "." rustflags: "-D warnings" + bin_name: versio.exe if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: "${{ matrix.os }}" steps: @@ -155,6 +158,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: "${{ needs.github-publish.outputs.upload_url }}" - asset_path: "./target/release/versio" + asset_path: "target/release/{{ matrix.bin_name }}" asset_name: "versio__${{ matrix.target }}" asset_content_type: application/octet-stream \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a2c0dd..24b66a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -162,7 +162,7 @@ jobs: with: tag_name: "${{ steps.find-version.outputs.version }}" release_name: "(TODO) RELEASE FOR ${{ steps.find-version.outputs.version }}" - body: "(TODO) SUMMARY\n- (TODO) FEATURE1\n\nNew to Versio? The [repository](https://github.com/chaaz/versio) is the best place to learn about Versio and what it can do. If you want to report a bug or request a feature, you can do so at our [Issues](https://github.com/chaaz/versio/issues) link, but we ask you first read the [Troubleshooting](https://github.com/chaaz/versio/blob/main/docs/troubleshooting.md) page learn about problems and their solutions.\n\nTo install, follow the instructions for your platform; some files might be zipped for improved download speed. For example, on MacOS you can do something like this (assuming `~/bin` exists and is in your PATH):\n\n```sh\ncurl -L https://github.com/chaaz/versio/releases/download/${{ steps.find-version.outputs.version }}/versio__x86_64-apple-darwin -o ~/bin/versio\nchmod +x ~/bin/versio\n```\n\n**MacOS:** download `versio__x86_64-apple-darwin`, copy to `versio` in your PATH.\n**GNU Linux 64:** download `versio__x86_64-unknown-linux-gnu`, copy to `versio` in your PATH.\n**Windows:** download `versio__x86_64-pc-win32`, copy to `versio` in your %PATH.\n" + body: "(TODO) SUMMARY\n- (TODO) FEATURE1\n\nNew to Versio? The [repository](https://github.com/chaaz/versio) is the best place to learn about Versio and what it can do. If you want to report a bug or request a feature, you can do so at our [Issues](https://github.com/chaaz/versio/issues) link, but we ask you first read the [Troubleshooting](https://github.com/chaaz/versio/blob/main/docs/troubleshooting.md) page learn about problems and their solutions.\n\nTo install, follow the instructions for your platform; some files might be zipped for improved download speed. For example, on MacOS you can do something like this (assuming `~/bin` exists and is in your PATH):\n\n```sh\ncurl -L https://github.com/chaaz/versio/releases/download/${{ steps.find-version.outputs.version }}/versio__x86_64-apple-darwin -o ~/bin/versio\nchmod +x ~/bin/versio\n```\n\n**MacOS:** download `versio__x86_64-apple-darwin`, copy to `versio` in your PATH.\n**GNU Linux 64:** download `versio__x86_64-unknown-linux-gnu`, copy to `versio` in your PATH.\n**Windows:** download `versio__x86_64-pc-win32.exe`, copy to `versio.exe` in your %PATH.\n" draft: true prerelease: false commitish: main @@ -175,14 +175,17 @@ jobs: target: x86_64-unknown-linux-gnu root: "." rustflags: "-D warnings -C link-args=-s" + bin_name: versio - os: macos-latest target: x86_64-apple-darwin root: "." rustflags: "-D warnings" + bin_name: versio - os: windows-latest - target: x86_64-pc-win32 + target: x86_64-pc-win32.exe root: "." rustflags: "-D warnings" + bin_name: versio.exe if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: "${{ matrix.os }}" steps: @@ -217,6 +220,6 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: "${{ needs.github-publish.outputs.upload_url }}" - asset_path: "./target/release/versio" + asset_path: "target/release/{{ matrix.bin_name }}" asset_name: "versio__${{ matrix.target }}" asset_content_type: application/octet-stream \ No newline at end of file