Hopefully finalize the release logic.

This commit is contained in:
Jordan Bancino 2024-09-21 16:52:41 -04:00
parent c7433bb745
commit 505d01cea1
Signed by: jordan
SSH key fingerprint: SHA256:KZSFf6aBlTjUn5fy3MH8uzqClGOnUaijIDirZKJsEsY

View file

@ -1,10 +1,7 @@
name: Release Telodendria name: Release Telodendria
run-name: Release Telodendria on ${{ forgejo.actor }} run-name: Release Telodendria on ${{ forgejo.actor }}
# on:
# tags: on: [tag]
# - 'v*'
# For testing only:
on: [push]
jobs: jobs:
"Release Telodendria": "Release Telodendria":
@ -18,9 +15,6 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
submodules: true submodules: true
- name: Determine release tag
id: tag
run: echo ::set-output name=TAG:$(git rev-parse --abbrev-ref HEAD)
- name: Archive submodules - name: Archive submodules
run: git submodule foreach --recursive 'git archive --format tar --prefix=$displaypath/ -o submodule.tar HEAD' run: git submodule foreach --recursive 'git archive --format tar --prefix=$displaypath/ -o submodule.tar HEAD'
- name: Archive repository - name: Archive repository
@ -29,11 +23,19 @@ jobs:
run: | run: |
TOPDIR=$(pwd) git submodule --quiet foreach --recursive 'cd $TOPDIR; tar --concatenate --file=release.tar $displaypath/submodule.tar; rm -fv $displaypath/submodule.tar' TOPDIR=$(pwd) git submodule --quiet foreach --recursive 'cd $TOPDIR; tar --concatenate --file=release.tar $displaypath/submodule.tar; rm -fv $displaypath/submodule.tar'
gzip release.tar gzip release.tar
mv release.tar.gz Telodendria-$RELEASE_TAG.tar.gz mkdir release
env: mv release.tar.gz release/Telodendria-$GITHUB_REF_NAME.tar.gz
RELEASE_TAG: ${{steps.tag.outputs.TAG}}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Telodendria-${{steps.tag.outputs.TAG}}.tar.gz name: Telodendria-$GITHUB_REF_NAME.tar.gz
path: Telodendria-${{steps.tag.outputs.TAG}}.tar.gz path: release/Telodendria-$GITHUB_REF_NAME.tar.gz
- name: Publish release
uses: actions/forgejo-release@v3
with:
tag: $GITHUB_REF_NAME
title: "Telodendria $GITHUB_REF_NAME"
release-dir: release/
release-notes: "docs/CHANGELOG.md"
direction: upload
prerelease: true