Skip to content

Commit

Permalink
chore: 修改CI (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
nashaofu authored Feb 1, 2024
1 parent 11c02d1 commit 2e70acf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
24 changes: 17 additions & 7 deletions .github/workflows/lint.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Lint
name: CI

on:
push:
branches:
- master
tags-ignore:
- "**"
pull_request: null
tags:
- v*.*.*

pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -44,6 +47,7 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
needs:
- lint
steps:
Expand All @@ -56,8 +60,14 @@ jobs:
override: true
components: rustfmt, clippy

# - name: Release draft
# uses: release-drafter/release-drafter@v5
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# publish: true

- name: Publish
if: github.event_name != 'pull_request'
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: cargo publish --registry crates-io --token $NPM_TOKEN
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --registry crates-io

0 comments on commit 2e70acf

Please sign in to comment.