mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Automatic publishing actions v2 (#2241)
This commit is contained in:
parent
5e1174a815
commit
1c49e89450
37
.github/workflows/publish-yew-agent.yml
vendored
37
.github/workflows/publish-yew-agent.yml
vendored
@ -6,17 +6,24 @@ on:
|
||||
level:
|
||||
description: 'Version Level major|minor|patch'
|
||||
required: true
|
||||
version:
|
||||
description: 'Release version (e.g. 0.1.0)'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew-router
|
||||
name: Publish yew-agent
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@ -28,29 +35,21 @@ jobs:
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: 0.18.5
|
||||
|
||||
- name: Release yew-agent
|
||||
run: |
|
||||
cd packages/yew-agent
|
||||
cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm
|
||||
run: cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm --package yew-agent
|
||||
env:
|
||||
PUBLISH_LEVEL: ${{ github.event.inputs.level }}
|
||||
CRATES_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Create Tag
|
||||
uses: EndBug/latest-tag@latest
|
||||
with:
|
||||
tag-name: yew-agent@${{ github.event.inputs.version }}
|
||||
description: UPDATE CHANGELOG
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: yew-agent@${{ github.event.inputs.version }}
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
39
.github/workflows/publish-yew-router.yml
vendored
39
.github/workflows/publish-yew-router.yml
vendored
@ -6,9 +6,11 @@ on:
|
||||
level:
|
||||
description: 'Version Level major|minor|patch'
|
||||
required: true
|
||||
version:
|
||||
description: 'Release version (e.g. 0.1.0)'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew-router
|
||||
@ -17,6 +19,11 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@ -28,37 +35,27 @@ jobs:
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: 0.18.5
|
||||
|
||||
- name: Release yew-router-macro
|
||||
run: |
|
||||
cd packages/yew-router-macro
|
||||
cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm
|
||||
run: cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm --package yew-router-macro
|
||||
env:
|
||||
PUBLISH_LEVEL: ${{ github.event.inputs.level }}
|
||||
CRATES_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew-router
|
||||
run: |
|
||||
cd packages/yew-router
|
||||
cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm
|
||||
run: cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm --package yew-router
|
||||
env:
|
||||
PUBLISH_LEVEL: ${{ github.event.inputs.level }}
|
||||
CRATES_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Create Tag
|
||||
uses: EndBug/latest-tag@latest
|
||||
with:
|
||||
tag-name: yew-router@${{ github.event.inputs.version }}
|
||||
description: UPDATE CHANGELOG
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: yew-router@${{ github.event.inputs.version }}
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
39
.github/workflows/publish-yew.yml
vendored
39
.github/workflows/publish-yew.yml
vendored
@ -6,9 +6,11 @@ on:
|
||||
level:
|
||||
description: 'Version Level major|minor|patch'
|
||||
required: true
|
||||
version:
|
||||
description: 'Release version (e.g. 0.1.0)'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew
|
||||
@ -17,6 +19,11 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@ -28,37 +35,27 @@ jobs:
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: 0.18.5
|
||||
|
||||
- name: Release yew-macro
|
||||
run: |
|
||||
cd packages/yew-macro
|
||||
cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm
|
||||
run: cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm --package yew-macro
|
||||
env:
|
||||
PUBLISH_LEVEL: ${{ github.event.inputs.level }}
|
||||
CRATES_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew
|
||||
run: |
|
||||
cd packages/yew
|
||||
cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm
|
||||
run: cargo release ${PUBLISH_LEVEL} --token ${CRATES_TOKEN} --execute --no-confirm --package yew
|
||||
env:
|
||||
PUBLISH_LEVEL: ${{ github.event.inputs.level }}
|
||||
CRATES_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Create Tag
|
||||
uses: EndBug/latest-tag@latest
|
||||
with:
|
||||
tag-name: yew@${{ github.event.inputs.version }}
|
||||
description: UPDATE CHANGELOG
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: yew@${{ github.event.inputs.version }}
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
1
packages/yew-macro/release.toml
Normal file
1
packages/yew-macro/release.toml
Normal file
@ -0,0 +1 @@
|
||||
tag = false
|
||||
1
packages/yew-router-macro/release.toml
Normal file
1
packages/yew-router-macro/release.toml
Normal file
@ -0,0 +1 @@
|
||||
tag = false
|
||||
2
release.toml
Normal file
2
release.toml
Normal file
@ -0,0 +1,2 @@
|
||||
pre-release-commit-message = "(cargo-release) version {{crate_name}}-v{{version}}"
|
||||
post-release-commit-message = "(cargo-release) start next development iteration {{crate_name}}-v{{next_version}}"
|
||||
Loading…
x
Reference in New Issue
Block a user