cubiomes-viewer/.github/workflows/source-release.yaml

44 lines
886 B
YAML
Raw Permalink Normal View History

name: Source Release
on:
push:
branches:
- 'trunk'
tags:
- 'v*'
defaults:
run:
shell: bash
env:
PROG: cubiomes-viewer
SOURCE_DIR: ${{github.workspace}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
2024-02-02 05:23:27 +08:00
- name: Build source bundle
working-directory: ${{env.SOURCE_DIR}}
2024-02-02 05:28:09 +08:00
run: |
2024-02-02 05:31:19 +08:00
rm -rf ./.git*
2024-02-02 05:28:09 +08:00
cd ..
tar cvzf ${{env.PROG}}-${{github.ref_name}}-src.tar.gz ${{env.PROG}}
2024-02-02 05:31:19 +08:00
mv ${{env.PROG}}-${{github.ref_name}}-src.tar.gz ${{env.SOURCE_DIR}}
2024-02-02 05:23:27 +08:00
- name: Save source artifact
2024-02-02 05:23:27 +08:00
uses: actions/upload-artifact@v4
with:
name: ${{env.PROG}}-${{github.ref_name}}-src.tar.gz
2024-02-02 05:31:19 +08:00
path: ${{env.PROG}}-${{github.ref_name}}-src.tar.gz
2024-02-02 05:12:46 +08:00