Skip to content

Commit

Permalink
ci: add GitHub release job
Browse files Browse the repository at this point in the history
  • Loading branch information
dezeroku committed Dec 21, 2024
1 parent 121bd69 commit 085889f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release new version

on:
push:
tags:
- "v*.*.*"

jobs:
# Docker images are handled with the usual flow, nothing needs to be done here in that regard
github-release:
runs-on: ubuntu-latest
needs: docker-release
steps:
- name: Get release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v4

- name: Zip the app
run: |
mkdir dist
zip -r dist/ses-local-email-entry-checker-${{ env.RELEASE_VERSION }}.zip lambda/entry_checker/*
- name: Create Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
dist/*
tag_name: v${{ env.RELEASE_VERSION }}
draft: true
body: |
## v${{ env.RELEASE_VERSION }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,10 @@ It is also much more interesting to play with than simply creating a separate em

One important caveat is that this tool is intended to run as a sidecar in K8S that fetches emails and puts them in pod's filesystem, so Paperless mechanism can consume it, it does not work with Paperless' IMAP mechanism.
But that should be more than enough to do the job.

## Development

### Releases

Github action is responsible for creating a draft release that includes necessary packages (e.g. it's responsible for packaging Lambdas).
It's enough to push a tag following the `v<semver>` scheme and wait for the action, afterwards just publish the draft.

0 comments on commit 085889f

Please sign in to comment.