mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
|
|
|
|
name: Weekly Release
|
|
|
|
on:
|
|
# schedule:
|
|
# This is a UTC time
|
|
# - cron: "30 7 * * 1"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: '0'
|
|
fetch-tags: 'true'
|
|
|
|
- name: setup python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: 'Release new branch and rc'
|
|
id: vars
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install semantic_version==2.10.0
|
|
|
|
python scripts/release.py
|
|
|
|
if [ -f /tmp/latest_tag_version ]; then
|
|
tag=$(</tmp/latest_tag_version)
|
|
[[ $tag =~ ^[0-9.]*-rc.0$ ]] || {
|
|
echo 'no available tag version'
|
|
exit 1
|
|
}
|
|
echo "tag_version=$tag" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Package installer
|
|
run: |
|
|
bash scripts/package.sh
|
|
|
|
- name: Update version
|
|
uses: eball/write-tag-to-version-file@latest
|
|
with:
|
|
filename: 'build/installer/wizard/config/settings/templates/terminus_cr.yaml'
|
|
placeholder: '#__VERSION__'
|
|
tag: ${{ steps.vars.outputs.tag_version }}
|
|
|
|
- name: Update env
|
|
working-directory: ./build/installer
|
|
run: |
|
|
echo 'DEBUG_VERSION="false"' > .env
|
|
|
|
|
|
- name: Update latest installer
|
|
uses: eball/write-tag-to-version-file@latest
|
|
with:
|
|
filename: 'build/installer/publicInstaller.latest'
|
|
placeholder: '#{{LATEST_VERSION}}'
|
|
tag: ${{ steps.vars.outputs.tag_version }}
|
|
|
|
- name: 'Archives'
|
|
working-directory: ./build/installer
|
|
run: |
|
|
mkdir -p /tmp/build
|
|
tar --exclude=wizard/tools --exclude=.git -zcvf /tmp/build/install-wizard-v${{ steps.vars.outputs.tag_version }}.tar.gz .
|
|
|
|
- name: Release public files
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: v${{ steps.vars.outputs.tag_version }} Release
|
|
tag_name: ${{ steps.vars.outputs.tag_version }}
|
|
files: |
|
|
/tmp/build/install-wizard-v${{ steps.vars.outputs.tag_version }}.tar.gz
|
|
build/installer/publicInstaller.sh
|
|
build/installer/publicInstaller.latest
|
|
build/installer/uninstall_cmd.sh
|
|
build/installer/publicAddnode.sh
|
|
build/installer/version.hint
|
|
build/installer/publicRestoreInstaller.sh
|
|
# prerelease: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|