Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: create the release workflow #195

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 6' # every Saturday

jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Read version from Git ref
id: version
shell: pwsh
run: echo "version=$(if ($env:GITHUB_REF.StartsWith('refs/tags/v')) { $env:GITHUB_REF -replace '^refs/tags/v', '' } else { 'next' })" >> $env:GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v4

- name: Read the changelog
uses: ForNeVeR/ChangelogAutomation.action@v1
with:
input: ./CHANGELOG.md
output: ./changelog-section.md

- name: Upload the changelog
uses: actions/upload-artifact@v4
with:
name: changelog-section.md
path: ./changelog-section.md

- name: Create a release
if: startsWith(github.ref, 'refs/tags/v')
# noinspection SpellCheckingInspection
uses: softprops/action-gh-release@v1
with:
name: Emulsion v${{ steps.version.outputs.version }}
body_path: ./changelog-section.md
1 change: 1 addition & 0 deletions Emulsion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\docker.yml = .github\workflows\docker.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Emulsion.Database", "Emulsion.Database\Emulsion.Database.fsproj", "{0111F688-1AE2-4B5D-BF46-D60B64078788}"
Expand Down
Loading