Skip to content

Commit

Permalink
Fix crate publication ci step
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser committed Apr 10, 2024
1 parent 64f49ce commit 2f046bb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@ jobs:
name: "Draft a new release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
- name: Install cargo-edit
uses: actions-rs/[email protected]
with:
crate: cargo-edit
version: latest
run: cargo install cargo-edit
- name: Extracting version from input
run: |
VERSION=$(echo "${{github.event.inputs.new-version}}" | sed 's/ (.*)$//')
Expand All @@ -36,30 +33,30 @@ jobs:
run: |
OLD_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "OLD=$OLD_VERSION" >> $GITHUB_ENV
cargo set-version --workspace --bump ${{ env.VER }}
cargo set-version --workspace --bump $VER
NEW_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "NEW=$NEW_VERSION" >> $GITHUB_ENV
- name: Create release branch
run: |
git checkout -b release/${{ env.NEW }}
git checkout -b release/$NEW
- name: Initialize mandatory git config
run: |
git config user.name "GitHub actions"
git config user.email [email protected]
- name: Updating Changelog and Dockerfile
run: .github/scripts/Bump.sh ${{ env.OLD }} ${{ env.NEW }}
run: .github/scripts/Bump.sh $OLD $NEW
- run: cargo check
- name: Commit changelog and manifest files
id: make-commit
run: |
git commit -sa -m "Prepare release ${{ env.NEW }}"
echo "::set-output name=commit::$(git rev-parse HEAD)"
git commit -sa -m "Prepare release $NEW"
echo "name=commit::$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Push new branch
run: git push origin release/${{ env.NEW }}
run: git push origin release/$NEW

- name: Create pull request
run: |
gh pr create -B main --title "Release-v${{ env.NEW }}" --body "Yay release" --label "Release"
gh pr create -B main --title "Release-v$NEW" --body "Yay release" --label "Release"
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-crates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
fetch-depth: 0
- uses: katyo/publish-crates@v2
with:
path: './tremor-script'
path: "./tremor-script"
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

invoke-tremor-language-server:
needs: [publish-tremor-script]
needs: [publish-tremor-crates]
name: Trigger Tremor LS release
runs-on: ubuntu-latest
steps:
Expand All @@ -33,5 +33,5 @@ jobs:
with:
workflow: Draft new release
repo: tremor-rs/tremor-language-server
inputs: '{ "version": "${{ env.VER }}"}'
inputs: '{ "version": "$VER"}'
token: ${{ secrets.PAT_TOKEN }}
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f046bb

Please sign in to comment.