Manually push tag
This commit is contained in:
parent
35f15d6b56
commit
91580cca28
|
@ -25,7 +25,8 @@
|
|||
"rust-lang.rust-analyzer",
|
||||
"tamasfe.even-better-toml",
|
||||
"serayuzgur.crates",
|
||||
"redhat.vscode-yaml"
|
||||
"redhat.vscode-yaml",
|
||||
"eamodio.gitlens"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
34
.github/workflows/publish.yml
vendored
Normal file
34
.github/workflows/publish.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify version
|
||||
run: ./.github/verify_version.sh
|
||||
|
||||
- name: Install latest stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Login
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: login
|
||||
args: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
- name: Publish qbittorrent-web-api-gen
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: publish
|
||||
args: --package qbittorrent-web-api-gen
|
||||
|
||||
- name: Publish qbittorrent-web-api
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: publish
|
48
.github/workflows/release.yml
vendored
48
.github/workflows/release.yml
vendored
|
@ -1,34 +1,46 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
create:
|
||||
branches:
|
||||
- 'create_release/*'
|
||||
jobs:
|
||||
publish:
|
||||
release:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify version
|
||||
run: ./.github/verify_version.sh
|
||||
|
||||
- name: Install latest stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Login
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Install cargo-edit
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
with:
|
||||
command: login
|
||||
args: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
crate: cargo-edit
|
||||
|
||||
- name: Publish qbittorrent-web-api-gen
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Determine version
|
||||
id: vars
|
||||
uses: actions/github-script@v5
|
||||
with:
|
||||
command: publish
|
||||
args: --package qbittorrent-web-api-gen
|
||||
script: |
|
||||
const { GITHUB_REF } = process.env
|
||||
const version = GITHUB_REF.replace('refs/heads/create_release/', '')
|
||||
console.log(`Got the following version: ${version}`)
|
||||
return version
|
||||
result-encoding: string
|
||||
|
||||
- name: Bump version
|
||||
run: cargo set-version --workspace ${{ steps.vars.outputs.result }}
|
||||
|
||||
- name: Publish qbittorrent-web-api
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git commit -am "Prepare version"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
command: publish
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
10
.github/workflows/tag.yml
vendored
10
.github/workflows/tag.yml
vendored
|
@ -14,8 +14,8 @@ jobs:
|
|||
VERSION=$(cat Cargo.toml | grep version | head -1 | sed 's/version = //' | sed 's/"//g')
|
||||
echo "::set-output name=version::$VERSION"
|
||||
|
||||
- uses: Klemensas/action-autotag@stable
|
||||
with:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
version: "${{ steps.determine-version.outputs.version }}"
|
||||
tag_prefix: "v"
|
||||
- name: Create and push tag
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git push origin "v${{ steps.determine-version.outputs.version }}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user