This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/.github/workflows/release.yml

42 lines
1.3 KiB
YAML
Raw Normal View History

2020-03-25 13:40:54 +00:00
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Create Release
2024-08-31 16:05:18 +00:00
runs-on: ubuntu-24.04
2020-03-25 13:40:54 +00:00
steps:
- name: Checkout code
2024-02-12 13:51:11 +00:00
uses: actions/checkout@v4
2020-03-25 13:40:54 +00:00
- name: Get version from tag
2020-03-25 13:53:21 +00:00
id: get_version
2024-01-05 15:59:53 +00:00
run: echo VERSION=${GITHUB_REF/refs\/tags\/v/} >> $GITHUB_OUTPUT
2020-03-25 13:53:21 +00:00
- name: Check and set sys_config
run: |
grep ${{ steps.get_version.outputs.VERSION }} core/sys_config.php
echo "_d('BUILD_TIME', '$(date +'%Y-%m-%dT%H:%M:%S')');" >> core/sys_config.php
echo "_d('BUILD_HASH', '$GITHUB_SHA');" >> core/sys_config.php
2020-03-25 13:40:54 +00:00
- name: Build
run: |
2024-01-05 15:59:53 +00:00
composer install --no-dev --no-progress
2020-03-25 13:40:54 +00:00
cd ..
2020-03-25 13:53:21 +00:00
tar cvzf shimmie2-${{ steps.get_version.outputs.VERSION }}.tgz shimmie2
zip -r shimmie2-${{ steps.get_version.outputs.VERSION }}.zip shimmie2
2020-03-25 13:40:54 +00:00
- name: Create Release
2024-01-28 21:27:07 +00:00
uses: softprops/action-gh-release@v1
2020-03-25 13:40:54 +00:00
with:
2024-01-28 21:23:29 +00:00
token: ${{ secrets.GITHUB_TOKEN }}
name: Shimmie ${{ steps.get_version.outputs.VERSION }}
2020-03-25 13:40:54 +00:00
body: Automated release from tags
2024-01-28 21:23:29 +00:00
files: |
../shimmie2-${{ steps.get_version.outputs.VERSION }}.zip
../shimmie2-${{ steps.get_version.outputs.VERSION }}.tgz