Skip to content

Commit

Permalink
pass templated semver string
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-kong committed Oct 19, 2023
1 parent 19800bc commit ae97e36
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/force-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
patch:
description: 'Semver patch label'
required: true
pull_request:
env:
MAJOR: ${{ github.event.inputs.major }}
MINOR: ${{ github.event.inputs.minor }}
PATCH: ${{ github.event.inputs.patch }}
SEMVER: $MAJOR.$MINOR.$PATCH
jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -32,22 +32,22 @@ jobs:
sed -i "s/define SBP_VERSION_MAJOR .*/define SBP_VERSION_MAJOR $MAJOR/" c/include/libsbp/version.h
sed -i "s/define SBP_VERSION_MINOR .*/define SBP_VERSION_MINOR $MINOR/" c/include/libsbp/version.h
sed -i "s/define SBP_VERSION_PATCH .*/define SBP_VERSION_PATCH $PATCH/" c/include/libsbp/version.h
sed -i "s/define SBP_VERSION \".*\"/define SBP_VERSION \"$MAJOR.$MINOR.$PATCH\"/" c/include/libsbp/version.h
sed -i "s/define SBP_VERSION \".*\"/define SBP_VERSION \"$SEMVER\"/" c/include/libsbp/version.h
- name: Update Haskell version
run: |
sed -i "s/version: .*/version: $MAJOR.$MINOR.$PATCH/" haskell/sbp.cabal
- name: Update Javascript version
run: |
echo "$MAJOR.$MINOR.$PATCH" > javascript/sbp/RELEASE-VERSION
sed -i "s/\"version\": \".*\"/\"version\": \"$MAJOR.$MINOR.$PATCH\"/" package.json
sed -i "s/\"version\": \".*\"/\"version\": \"$MAJOR.$MINOR.$PATCH\"/" package-lock.json
sed -i "s/\"version\": \".*\"/\"version\": \"$SEMVER\"/" package.json
sed -i "s/\"version\": \".*\"/\"version\": \"$SEMVER\"/" package-lock.json
- name: Update Python version
run: |
echo "$MAJOR.$MINOR.$PATCH" > python/sbp/RELEASE-VERSION
- name: Update Rust version
run: |
sed -i "s/version = \".*\"/version = \"$MAJOR.$MINOR.$PATCH\"/" rust/sbp/Cargo.toml
sed -i "s/version = \".*\"/version = \"$MAJOR.$MINOR.$PATCH-unreleased\"/" rust/sbp2json/Cargo.toml
sed -i "s/version = \".*\"/version = \"$SEMVER\"/" rust/sbp/Cargo.toml
sed -i "s/version = \".*\"/version = \"$SEMVER-unreleased\"/" rust/sbp2json/Cargo.toml
- name: Debug
run: git status
# - name: Update PDF
Expand All @@ -63,12 +63,12 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: "chore: force release v$MAJOR.$MINOR.$PATCH"
title: "chore: force release v$MAJOR.$MINOR.$PATCH"
body: "chore: force release v$MAJOR.$MINOR.$PATCH"
branch: "force-release-v$MAJOR.$MINOR.$PATCH"
commit-message: "chore: force release ${{ env.SEMVER }}"
title: "chore: force release ${{ env.SEMVER }}"
body: "chore: force release ${{ env.SEMVER }}"
branch: "force-release-${{ env.SEMVER }}"
base: "master"
branch-suffix: "force-release-v$MAJOR.$MINOR.$PATCH"
branch-suffix: "force-release-${{ env.SEMVER }}"
delete-branch: true
add-paths: |
*

0 comments on commit ae97e36

Please sign in to comment.