Skip to content

Commit

Permalink
Test trigger on all push
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Feb 17, 2024
1 parent fdfc319 commit 856c43b
Showing 1 changed file with 37 additions and 32 deletions.
69 changes: 37 additions & 32 deletions .github/workflows/check_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,31 @@ name: Check Release
on:
push:
branches:
- 'r/[0-9]+.[0-9]+.[0-9]+(-[0-9a-zA-Z]+)?'
- 'r/[0-9]+.[0-9]+.[0-9]+'
- 'r/[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+'

jobs:
check-version:
name: check-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get the release version from the branch
if: env.VERSION == ''
run: |
VERSION=${{ github.head_ref }}
VERSION=${VERSION##r/}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Show the version
run: |
echo "version is: $VERSION"
- name: Check that tag version and Cargo.toml version are the same
shell: bash
run: |
if ! grep -q "version = \"$VERSION\"" Cargo.toml; then
echo "version does not match Cargo.toml" >&2
exit 1
fi
- uses: actions/checkout@v4
- name: Get the release version from the branch
if: env.VERSION == ''
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION##r/}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Show the version
run: |
echo "version is: $VERSION"
- name: Check that tag version and Cargo.toml version are the same
shell: bash
run: |
if ! grep -q "version = \"$VERSION\"" Cargo.toml; then
echo "version does not match Cargo.toml" >&2
exit 1
fi
outputs:
version: ${{ env.VERSION }}

Expand Down Expand Up @@ -156,17 +157,21 @@ jobs:
name: Check cargo publication
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Test Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish --dry-run -p libarx
# Until cargo publish can publish serveral package in the same time,
# only libarx will work in `--dry-run` mode.
# See https://github.com/rust-lang/cargo/issues/1169
#cargo publish --dry-run -p arx
#cargo publish --dry-run -p tar2arx
#cargo publish --dry-run -p zip2arx
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install -y libfuse-dev
- name: Checkout code
uses: actions/checkout@v4

- name: Test Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish --dry-run -p libarx
# Until cargo publish can publish serveral package in the same time,
# only libarx will work in `--dry-run` mode.
# See https://github.com/rust-lang/cargo/issues/1169
#cargo publish --dry-run -p arx
#cargo publish --dry-run -p tar2arx
#cargo publish --dry-run -p zip2arx

0 comments on commit 856c43b

Please sign in to comment.