Update CONTRIBUTING.md #179
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create source package | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- uuu* | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
build: | |
name: Create source package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Build | |
run: | | |
git archive --prefix "uuu-${{ github.ref_name }}/" -o "uuu_source-${{ github.ref_name }}.tar" HEAD ; | |
git submodule foreach --recursive "git archive --prefix=uuu-${{ github.ref_name }}/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/uuu_source-${{ github.ref_name }}.tar \$sha1.tar && rm \$sha1.tar" | |
mkdir uuu-${{ github.ref_name }}; git describe --tags --long >uuu-${{ github.ref_name }}/.tarball-version | |
tar -r uuu-${{ github.ref_name }}/.tarball-version -f uuu_source-${{ github.ref_name }}.tar | |
gzip uuu_source-${{ github.ref_name }}.tar | |
tar xzf uuu_source-${{ github.ref_name }}.tar.gz && zip uuu_source-${{ github.ref_name }}.zip $(tar tf uuu_source-${{ github.ref_name }}.tar.gz) | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: uuu_source-${{ github.ref_name }}.tar.gz | |
path: uuu_source-${{ github.ref_name }}.tar.gz | |
- name: Create or Update Release | |
if: github.ref_type == 'tag' | |
uses: ncipollo/release-action@v1 | |
with: | |
name: Release ${{ github.ref_name }} | |
tag: ${{ github.ref_name }} | |
commit: ${{ github.sha }} | |
allowUpdates: true | |
prerelease: true | |
artifacts: "uuu_source-${{ github.ref_name }}.tar.gz, uuu_source-${{ github.ref_name }}.zip" |