Skip to content

Commit

Permalink
Adjust workflow for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
ll-nick committed Nov 29, 2024
1 parent 3de7483 commit 45367a9
Showing 1 changed file with 1 addition and 68 deletions.
69 changes: 1 addition & 68 deletions .github/workflows/bump-version-and-create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Bump version and create release
on:
pull_request:
types:
- closed
branches:
- main
push:

jobs:
compute-version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -42,65 +37,3 @@ jobs:
run: |
echo "New version: ${{ needs.compute-version.outputs.new_version }}"
echo "VERSION=${{ needs.compute-version.outputs.new_version }}" > version
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add version
git commit -m "chore: update version file to ${{ needs.compute-version.outputs.new_version }}"
git push
- name: Push new tag
run: |
git tag ${{ needs.compute-version.outputs.new_version }}
git push origin ${{ needs.compute-version.outputs.new_version }}
create-release:
needs: [compute-version, update-version-file]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out the repository and pull the new tag
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.compute-version.outputs.new_version }}

- name: Build release packages
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: |
release_builder
target: release

- name: Copy release packages
run: |
mkdir -p /tmp/artifacts/
docker run --rm -v /tmp/artifacts:/tmp/artifacts release_builder cp -r /release /tmp/artifacts/
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "/tmp/artifacts/release/*"
tag: ${{ needs.compute-version.outputs.new_version }}
body: ${{ github.event.pull_request.body }}


build-and-run-release-tests:
needs: [compute-version, create-release]
runs-on: ubuntu-latest
steps:
- name: Build release test Docker image
uses: docker/build-push-action@v6
with:
build-args: |
RELEASE_DOWNLOAD_URL=https://github.com/KIT-MRT/util_caching/releases/download/${{ needs.compute-version.outputs.new_version }}
push: false
tags: release_tester
target: release_test

- name: Run unit tests with/against released version
run: |
docker run --rm release_tester

0 comments on commit 45367a9

Please sign in to comment.