Skip to content

Commit

Permalink
Update release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Dec 20, 2023
1 parent 792194c commit 945db9b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/release-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ jobs:
run: |
cargo install cargo-get
echo "version=$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT
- id: changelog
uses: mikepenz/[email protected]
with:
fromTag: v${{ steps.current_release_info.outputs.version }}
toTag: main
- uses: peter-evans/create-pull-request@v5
with:
# We have to use a PAT in order to trigger ci
Expand All @@ -42,4 +37,3 @@ jobs:
branch: prepare-release
base: main
delete-branch: true
body: ${{steps.changelog.outputs.changelog}}
34 changes: 21 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,8 @@ jobs:
fi
shell: bash

# Creates the release for this specific version
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.event.pull_request.title }}
tag_name: ${{ needs.prepare.outputs.tag_name }}
body: ${{ github.event.pull_request.body }}
files: |
${{ steps.artifacts.outputs.file_name }}
# We move binaries so they match $TARGETPLATFORM in the Docker build
- name: Move Binaries
if: ${{ env.PLATFORM_NAME == 'linux' }}
run: |
mkdir -p $PLATFORM_NAME/$ARCH
mv target/$TARGET/release/katana $PLATFORM_NAME/$ARCH
Expand All @@ -146,8 +135,24 @@ jobs:
path: ${{ env.PLATFORM_NAME }}
retention-days: 1

create-draft-release:
runs-on: ubuntu-latest-4-cores
needs: [prepare, release]
env:
GITHUB_USER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: binaries
path: artifacts
- name: Display structure of downloaded files
run: ls -R artifacts
- run: gh release create --generate-notes --draft ./artifacts

docker-build-and-push:
name: Build and push docker image
runs-on: ubuntu-latest-4-cores
needs: [prepare, release]

Expand All @@ -159,7 +164,10 @@ jobs:
uses: actions/download-artifact@v3
with:
name: binaries
path: artifacts/linux
path: artifacts

- name: Display structure of downloaded files
run: ls -R artifacts

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down

0 comments on commit 945db9b

Please sign in to comment.