Skip to content

Commit

Permalink
(#4) CI: enable release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Feb 4, 2024
1 parent 25d7550 commit 4c2ff5f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Main
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
repository_dispatch:
types: [ periodic ]
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Check out the sources
uses: actions/checkout@v3

- name: Prepare the release notes
uses: ForNeVeR/ChangelogAutomation.action@v1
with:
input: ./CHANGELOG.md
output: ./release-notes.md
format: Markdown
- name: Upload the release notes
uses: actions/upload-artifact@v4
with:
name: release-notes
path: ./release-notes.md

- name: Create the release
if: startsWith(github.ref, 'refs/tags/v')
id: release
# noinspection SpellCheckingInspection
uses: softprops/action-gh-release@v1
with:
body_path: ./release-notes.md
17 changes: 17 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Periodic Trigger
on:
schedule:
- cron: '0 0 * * 0' # Every Sunday

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Trigger main workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT: periodic
ORG: ForNeVeR
REPO: andivionian-status-classifier
run: |
curl -d "{\"event_type\": \"${EVENT}\"}" -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.everest-preview+json" "https://api.github.com/repos/${ORG}/${REPO}/dispatches"

0 comments on commit 4c2ff5f

Please sign in to comment.