Skip to content

Commit

Permalink
fix: windows target
Browse files Browse the repository at this point in the history
  • Loading branch information
chaaz committed Nov 8, 2020
1 parent ce72163 commit 822d001
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/snippets/job-publish-versio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/snippets/steps-github-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 6 additions & 3 deletions .github/workflows/github-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 822d001

Please sign in to comment.