Skip to content

Commit

Permalink
Make release in Gthub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
o01eg committed Jun 13, 2022
1 parent 3877f2e commit fda34eb
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 92 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,22 @@ jobs:
cmake --build . --config RelWithDebInfo
- name: Artifact
uses: actions/upload-artifact@v2
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: MacOS SDK
path: |
build/FreeOrionSDK_*.tar.bz2
- name: Prepare Release
if: startsWith(github.ref, 'refs/tags/v')
id: prepare-release-options
run: |
echo "::set-output name=release-name::$(git tag -ln --format '%(subject)' ${{ github.ref_name }})"
- uses: softprops/action-gh-release@v1
name: Release
if: startsWith(github.ref, 'refs/tags/v')
with:
name: ${{ steps.prepare-release-options.outputs.release-name }}
draft: true
files: |
build/FreeOrionSDK_*.tar.bz2
token: ${{ secrets.RELEASE_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Prepare release description"

on:
push:
tags:
- v*

jobs:
prepare-release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Prepare Release
id: prepare-release-options
run: |
echo "::set-output name=release-name::$(git tag -ln --format '%(subject)' ${{ github.ref_name }})"
RELEASE_NOTES=$(tempfile)
sed -n -e '/## /{x;s/^/x/;/x\{2\}/q;x;}' -e '/## /,/## /!d' -e 'p' ChangeLog.md >> $RELEASE_NOTES
echo "::set-output name=release-notes::$RELEASE_NOTES"
- uses: softprops/action-gh-release@v1
name: Release
with:
name: ${{ steps.prepare-release-options.outputs.release-name }}
draft: true
token: ${{ secrets.RELEASE_TOKEN }}
body_path: ${{ steps.prepare-release-options.outputs.release-notes }}
17 changes: 15 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,22 @@ jobs:
cmake --build . --config RelWithDebInfo -- /verbosity:d
- name: Artifact
uses: actions/upload-artifact@v2
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: Windows SDK
path: |
build/FreeOrionSDK_*_MSVC-${{ matrix.toolset }}-${{ matrix.arch }}.zip
- name: Prepare Release
if: startsWith(github.ref, 'refs/tags/v')
id: prepare-release-options
run: |
echo "::set-output name=release-name::$(git tag -ln --format '%(subject)' ${{ github.ref_name }})"
- uses: softprops/action-gh-release@v1
name: Release
if: startsWith(github.ref, 'refs/tags/v')
with:
name: ${{ steps.prepare-release-options.outputs.release-name }}
draft: true
files: |
build/FreeOrionSDK_*_MSVC-${{ matrix.toolset }}-${{ matrix.arch }}.zip
token: ${{ secrets.RELEASE_TOKEN }}
90 changes: 0 additions & 90 deletions .travis.yml

This file was deleted.

0 comments on commit fda34eb

Please sign in to comment.