Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More CI Improvements #1563

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ jobs:
run: |
git tag -a -m "Release v${{ env.RELEASE_VERSION }}" "v${{ env.RELEASE_VERSION }}"
git push origin v${{ env.RELEASE_VERSION }}
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Create release
uses: actions/create-release@v1
with:
tag_name: v${{ env.RELEASE_VERSION }}
release_name: Release v${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
body: ${{ steps.extract-release-notes.outputs.release_notes }}
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/draft-Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ jobs:
git config user.email noreply@github.com
- name: Bump new version in TOML files
run: sh ./scriptBump.sh ${{github.event.inputs.old-version}} ${{github.event.inputs.new-version}}
- uses: actions-rs/install@v0.1
with:
crate: cargo-edit
version: latest
- run: cargo set-version --workspace ${{github.event.inputs.new-version}}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo check
- name: Commit changelog and manifest files
id: make-commit
run: |
Expand Down
38 changes: 2 additions & 36 deletions scriptBump.sh
Original file line number Diff line number Diff line change
@@ -1,46 +1,12 @@
#!/usr/bin/env bash

TOML_FILES="\
Cargo.toml \
tremor-api/Cargo.toml \
tremor-cli/Cargo.toml \
tremor-common/Cargo.toml \
tremor-influx/Cargo.toml \
tremor-pipeline/Cargo.toml \
tremor-script/Cargo.toml \
tremor-value/Cargo.toml
"
VERSION_TESTS="\
tremor-cli/tests/api-cli/command.yml \
tremor-cli/tests/api/command.yml\
"
DOCKER_FILES="\
Dockerfile.learn\
"
PACKAGES="\
tremor-common \
tremor-value \
tremor-script\
"

old=$1
new=$2

echo -n "Updating TOML files:"
for toml in ${TOML_FILES}
do
echo -n " ${toml}"
sed -e "s/^version = \"${old}\"$/version = \"${new}\"/" -i.release "${toml}"
done
echo "."

echo -n "Updating Version Tests:"
for f in ${VERSION_TESTS}
do
echo -n " ${f}"
sed -e "s/- '{\"version\":\"${old}\"/- '{\"version\":\"${new}\"/" -i.release "${f}"
done
echo "."

echo -n "Updating Docker files:"
for f in ${DOCKER_FILES}
do
Expand All @@ -50,4 +16,4 @@ done
echo "."

echo "Updating CHANGELOG.md"
sed -e "s/^## Unreleased$/## ${new}/" -i.release "CHANGELOG.md"
sed -e "s/^## \[${old}\]/## [${new}]/" -i.release "CHANGELOG.md"