mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Consolidate publish workflows into one (#3026)
* Consolidate publish-* workflows into one * Update workflow name
This commit is contained in:
parent
57f45e2c81
commit
0ad939bd34
65
.github/workflows/publish-yew-agent.yml
vendored
65
.github/workflows/publish-yew-agent.yml
vendored
@ -1,65 +0,0 @@
|
||||
name: Publish yew-agent
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
level:
|
||||
description: "Version Level major|minor|patch"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew-agent
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: =0.23.1
|
||||
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew-agent
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm --package yew-agent
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
- name: Create a Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.YEWTEMPBOT_TOKEN }}
|
||||
tag_name: ${{ steps.gettag.outputs.tag }}
|
||||
body: ${{ steps.changelog.outputs.stdout }}
|
||||
66
.github/workflows/publish-yew-only.yml
vendored
66
.github/workflows/publish-yew-only.yml
vendored
@ -1,66 +0,0 @@
|
||||
name: Publish yew ONLY (WITHOUT MACRO)
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
level:
|
||||
description: "Version Level major|minor|patch"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: =0.23.1
|
||||
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew
|
||||
run: cargo release ${PUBLISH_LEVEL} --execute --no-confirm --package yew
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
- name: Create a Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.YEWTEMPBOT_TOKEN }}
|
||||
tag_name: ${{ steps.gettag.outputs.tag }}
|
||||
body: ${{ steps.changelog.outputs.stdout }}
|
||||
65
.github/workflows/publish-yew-router-only.yml
vendored
65
.github/workflows/publish-yew-router-only.yml
vendored
@ -1,65 +0,0 @@
|
||||
name: Publish yew-router ONLY (WITHOUT MACRO)
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
level:
|
||||
description: "Version Level major|minor|patch"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew-router
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: =0.23.1
|
||||
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew-router
|
||||
run: cargo release ${PUBLISH_LEVEL} --execute --no-confirm --package yew-router
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
- name: Create a Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.YEWTEMPBOT_TOKEN }}
|
||||
tag_name: ${{ steps.gettag.outputs.tag }}
|
||||
body: ${{ steps.changelog.outputs.stdout }}
|
||||
68
.github/workflows/publish-yew-router.yml
vendored
68
.github/workflows/publish-yew-router.yml
vendored
@ -1,68 +0,0 @@
|
||||
name: Publish yew-router & yew-router-macro
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
level:
|
||||
description: "Version Level major|minor|patch"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew-router
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Config Git
|
||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
crate: cargo-release
|
||||
version: =0.23.1
|
||||
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew-router-macro
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm --package yew-router-macro
|
||||
|
||||
- name: Release yew-router
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm --package yew-router
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
uses: peterjgrainger/action-create-branch@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: ${{ steps.gettag.outputs.tag }}
|
||||
|
||||
- name: Create a Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.YEWTEMPBOT_TOKEN }}
|
||||
tag_name: ${{ steps.gettag.outputs.tag }}
|
||||
body: ${{ steps.changelog.outputs.stdout }}
|
||||
@ -1,4 +1,5 @@
|
||||
name: Publish yew & yew-macro
|
||||
name: Publish yew package(s)
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
@ -13,6 +14,11 @@ on:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
packages:
|
||||
description: "List of packages to publish (space separated)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish yew
|
||||
@ -43,17 +49,27 @@ jobs:
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Release yew-macro
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm --package yew-macro
|
||||
- name: Build command
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGES: ${{ github.event.inputs.packages }}
|
||||
run: |
|
||||
output=""
|
||||
for pkg in ${{ github.event.inputs.packages }}
|
||||
do
|
||||
output+="--package $pkg "
|
||||
done
|
||||
echo "pkg=$output" >> $GITHUB_ENV
|
||||
|
||||
- name: Release yew
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm --package yew
|
||||
run: cargo release ${{ github.event.inputs.level }} --execute --no-confirm ${{ env.pkg }}
|
||||
|
||||
- name: Get tag
|
||||
id: gettag
|
||||
uses: WyriHaximus/github-action-get-previous-tag@v1
|
||||
|
||||
- name: Create a version branch
|
||||
if: github.event.inputs.level != 'patch'
|
||||
uses: peterjgrainger/action-create-branch@v2.4.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
x
Reference in New Issue
Block a user