options: version: usage: The build version short: v required: true tasks: setup: run: - command: cargo install cross - command: go get github.com/aktau/github-release build:macos: run: - command: cargo build --release - command: mkdir -p dist - command: cp ./target/release/rust-cli-test ./dist/rust-cli-test - command: cd dist && tar -czvf rust-cli-test-v${version}-x86_64-apple-darwin.tar.gz rust-cli-test && rm rust-cli-test && cd .. build:linux: run: - command: cross build --release --target x86_64-unknown-linux-gnu - command: mkdir -p dist - command: cp ./target/x86_64-unknown-linux-gnu/release/rust-cli-test ./dist/rust-cli-test - command: cd dist && tar -czvf rust-cli-test-v${version}-x86_64-unknown-linux-gnu.tar.gz rust-cli-test && rm rust-cli-test && cd .. build:windows: run: - command: cross build --release --target x86_64-pc-windows-gnu - command: mkdir -p dist - command: cp ./target/x86_64-pc-windows-gnu/release/rust-cli-test.exe ./dist/rust-cli-test.exe - command: cd dist && zip rust-cli-test-v${version}-x86_64-pc-windows-gnu.zip rust-cli-test.exe && rm rust-cli-test.exe && cd .. build: run: - command: tusk build:macos --version ${version} - command: tusk build:linux --version ${version} - command: tusk build:windows --version ${version} upload-artifacts: run: command: chmod +x scripts/upload-artifacts.sh && ./scripts/upload-artifacts.sh ${version} confirm: args: message: usage: The confirmation message run: echo "\n${message}\n" && read confirmation release: run: - command: git checkout develop && git push - command: git flow release start "v${version}" - command: tusk confirm "Please bump version with ${version} in Cargo.toml file. Hit Enter once done:" - command: git add --all && git commit -m "Bump version" - command: git flow release finish -s "v${version}" - command: git checkout master - command: git push origin master && git push origin develop && git push --tags - command: tusk confirm "Tags are pushed to Github. Edit it there and make it a release. Hit Enter once done:" - command: rm -rf dist - command: tusk build --version ${version} - command: tusk upload-artifacts --version ${version} - command: tusk confirm "Publishing to crates.io, hit Enter to confirm:" - command: cargo publish - command: git checkout develop