separate letro relese workflows
This commit is contained in:
2
.github/scripts/commit-and-tag.cjs
vendored
2
.github/scripts/commit-and-tag.cjs
vendored
@@ -13,7 +13,7 @@ module.exports = async ({ github, context }) => {
|
||||
const parent = context.sha;
|
||||
if (!version) throw new Error("VERSION is not defined");
|
||||
|
||||
const files = ["Cargo.toml", "Cargo.lock"];
|
||||
const files = ["LETRO_VERSION"];
|
||||
|
||||
/** @type {{path: string, mode: "100644", type: "blob", sha: string}[]} */
|
||||
const tree = [];
|
||||
|
||||
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@@ -8,7 +8,7 @@ name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# - main
|
||||
- "release/**"
|
||||
tags:
|
||||
- "letro-v*"
|
||||
|
||||
5
.github/workflows/release-branch.yaml
vendored
5
.github/workflows/release-branch.yaml
vendored
@@ -36,15 +36,12 @@ jobs:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Compute the new minor RC
|
||||
id: next
|
||||
env:
|
||||
BUMP: pre${{ inputs.kind }}
|
||||
run: |
|
||||
CURRENT_VERSION="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "mas-cli") | .version')"
|
||||
CURRENT_VERSION="$(cat LETRO_VERSION | tr -d '[:space:]')"
|
||||
NEXT_VERSION="$(npx --yes semver@7.5.4 -i "$BUMP" --preid rc "${CURRENT_VERSION}")"
|
||||
# compute the short minor version, e.g. 0.1.0-rc.1 -> 0.1
|
||||
SHORT_VERSION="$(echo "${NEXT_VERSION}" | cut -d. -f1-2)"
|
||||
|
||||
5
.github/workflows/release-bump.yaml
vendored
5
.github/workflows/release-bump.yaml
vendored
@@ -35,12 +35,9 @@ jobs:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Extract the current version
|
||||
id: current
|
||||
run: echo "version=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "mas-cli") | .version')" >> "$GITHUB_OUTPUT"
|
||||
run: echo "version=$(cat LETRO_VERSION | tr -d '[:space:]')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Compute the new minor RC
|
||||
id: next
|
||||
|
||||
12
.github/workflows/tag.yaml
vendored
12
.github/workflows/tag.yaml
vendored
@@ -32,18 +32,10 @@ jobs:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Set the crates version
|
||||
- name: Set the fork version
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
sed -i "s/^package.version = .*/package.version = \"$VERSION\"/" Cargo.toml
|
||||
sed -i "/path = \".\/crates\//s/version = \".*\"/version = \"=$VERSION\"/" Cargo.toml
|
||||
|
||||
- name: Run `cargo metadata` to make sure the lockfile is up to date
|
||||
run: cargo metadata --format-version 1
|
||||
run: echo "$VERSION" > LETRO_VERSION
|
||||
|
||||
- name: Commit and tag using the GitHub API
|
||||
uses: actions/github-script@v8.0.0
|
||||
|
||||
Reference in New Issue
Block a user