Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): remove tagging from release ci #443

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,6 @@ on:
workflow_dispatch:

jobs:
git-tag:
runs-on: ubuntu-latest
steps:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Checkout
uses: actions/checkout@v4

- name: Get releasing version
working-directory: .
run: |
NEXT_VERSION=$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
echo NEXT_VERSION=$NEXT_VERSION >> $GITHUB_ENV
echo $NEXT_VERSION

- name: Check published version
run: |
PREV_VERSION=$(cargo search socketioxide --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -)
echo PREV_VERSION=$PREV_VERSION >> $GITHUB_ENV
echo $PREV_VERSION

- name: Cancel run
if: env.NEXT_VERSION == env.PREV_VERSION
uses: andymckay/[email protected]

- name: Auto tag latest version
uses: bullrich/commit-autotag@main
if: env.NEXT_VERSION != env.PREV_VERSION
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
strategy: regex
root: Cargo.toml
regex_pattern: "version\\s*=\\s*\"([0-9\\.]+)\""
tag_prefix: "v"
version: "${{ env.NEXT_VERSION }}"

publish:
runs-on: ubuntu-latest
needs:
Expand Down
Loading