Skip to content

fix(update-command): Wait for cargo-edit to install #43

fix(update-command): Wait for cargo-edit to install

fix(update-command): Wait for cargo-edit to install #43

Workflow file for this run

name: Pipeline
on:
push:
branches:
- '*'
pull_request:
permissions:
contents: write
jobs:
run-tests:
uses: ./.github/workflows/run-tests.yml
test-github-actions:
uses: ./.github/workflows/test-actions.yml
bump-cargo-version:
runs-on: ubuntu-latest
needs:
- run-tests
- test-github-actions
if: github.ref == 'refs/heads/main' && needs.run-tests.outputs.will-bump == 'true'
steps:
- uses: tomphp/github-actions/checkout-rust-project@v0.2.0
- uses: tomphp/versioned-files/github-actions/versioned-files@v0.4.0
with:
action: update
version: ${{ needs.run-tests.outputs.bump-version }}
- name: Store updated files
uses: actions/upload-artifact@v3
with:
name: bumped-files
path: |
Cargo.*
README.md
build-binaries:
if: github.ref == 'refs/heads/main'
runs-on: ${{ matrix.os }}
needs:
- run-tests
- bump-cargo-version
steps:
- uses: tomphp/github-actions/checkout-rust-project@v0.2.0
- uses: actions/download-artifact@v3
- run: mv bumped-files/Cargo.* .
shell: bash
- uses: tomphp/github-actions/determine-binary-name@v0.5.0
id: get-binary-name
with:
name: versioned-files
- uses: actions-rs/cargo@v1.0.3
name: Build release version
with:
args: --release --locked
command: build
- name: Move binary to upload location
env:
BINARY_NAME: ${{ steps.get-binary-name.outputs.name }}
BINARY_NAME_WITH_ARCH: ${{ steps.get-binary-name.outputs.name-with-arch }}
run: mv "./target/release/$BINARY_NAME" "./$BINARY_NAME_WITH_ARCH"
shell: bash
- uses: actions/upload-artifact@v3
name: Store built binary version
with:
name: bins
path: ${{ steps.get-binary-name.outputs.name-with-arch }}
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
tag-and-release:
needs:
- build-binaries
- bump-cargo-version
uses: armakuni/github-actions/.github/workflows/tag-and-release.yml@v0.18.1
with:
download-artifacts: true
release-artifacts: ./bins/*