Skip to content

Commit

Permalink
Fix/release process (#16)
Browse files Browse the repository at this point in the history
* Fix release process

* Review release creation
  • Loading branch information
cwang authored Jun 7, 2023
1 parent 6f1b716 commit 8263fb7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -19,12 +16,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false
- name: Get short SHA
id: short-sha
run: echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -43,6 +37,5 @@ jobs:
TARGET=prod
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref }}
ghcr.io/${{ github.repository }}:${{ github.run_number }}-${{ steps.short-sha.outputs.sha }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
context: .
10 changes: 10 additions & 0 deletions docs/developer-guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,14 @@ Some useful examples of how this project can be used:
poe docker-run
```
- Release
Switch to `main` branch locally and run
```sh
./trigger-release.sh
```
which creates a new release tag which further creates a GitHub release and a container image published to GitHub registry, via GitHub Actions.
_For more examples, please refer to the [Documentation](https://docqai.github.io/docq/)_
5 changes: 3 additions & 2 deletions trigger-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
poe test
VERSION=(poetry version --short)
TAG_NAME="v${VERSION}"
VER=`poetry version --short`
TAG="v${VER}"
echo "Tagging release ${TAG}"
git tag $TAG_NAME
git push origin $TAG_NAME

Expand Down

0 comments on commit 8263fb7

Please sign in to comment.