diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d6e356..12e35af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,7 @@ on: branches: - main tags-ignore: - - "cli-v*.*.*" - - "lib-v*.*.*" + - "*" jobs: check: diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 733c2ed..830591d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -6,8 +6,7 @@ on: - staging - trying tags-ignore: - - "cli-v*.*.*" - - "lib-v*.*.*" + - "*" jobs: test: @@ -43,6 +42,9 @@ jobs: profile: minimal toolchain: "${{ matrix.toolchain }}" override: true - - uses: actions-rs/cargo@v1 + - name: Run test suite + uses: actions-rs/cargo@v1 with: command: test + - name: Check that CLI runs + run: cargo run -p watchexec-cli -- -1 echo diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 360a266..b7bcb87 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -3,6 +3,8 @@ on: push: branches: - main + tags-ignore: + - "*" jobs: make-tag: @@ -15,13 +17,24 @@ jobs: - name: Extract tag from commit message run: | set -euxo pipefail - message="${{ github.event.head_commit.message }}" + + read -r -d '' message <<'COMMITMESSAGESEPARATOR' + ${{ github.event.head_commit.message }} + COMMITMESSAGESEPARATOR + + # trim both ends + message="${message#"${message%%[![:space:]]*}"}" + message="${message%"${message##*[![:space:]]}"}" + + # get first line + message="$(head -n1 <<< "$message")" + crate="$(cut -d ' ' -f 2 <<< "${message}")" - version="$(cut -d ' ' -f 3 <<< "${message}" | tr -d 'v')" + version="$(cut -d ' ' -f 3 <<< "${message}")" echo "CUSTOM_TAG=${crate}-${version}" >> $GITHUB_ENV - uses: actions/checkout@v2 - - name: Bump version and push tag + - name: Push release tag id: tag_version uses: mathieudutour/github-tag-action@v6.0 with: