Skip to content

rls

rls #85

Workflow file for this run

name: rls
on: workflow_dispatch
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Installing `libarchive-tools`
run: |
sudo apt-get update
sudo apt-get install libarchive-tools
- name: Writing the variables
run: |
rfile='./cfg/njk-release'
date +'release-time=%s' >> "${rfile}"
cat "${rfile}" | tee -a "${GITHUB_ENV}"
- name: Compressing
run: |
bsdtar \
--exclude-vcs --exclude=./{.github/,README.md} \
-b1 -cv ./* \
| zstd -T0 --ultra -20zvc > ./njki
- name: Releasing
env:
GH_TOKEN: ${{ github.token }}
run: |
sha="$(openssl sha256 ./njki | cut -d ' ' -f2)"
shapart="${sha:0:2}-${sha:2:3}-${sha:5:3}--${sha:8:2}-${sha:10:3}-${sha:13:3}"
[[ "${release}" == 'test' ]] && flag='-p'
gh release delete "${release}" --cleanup-tag -y || true
echo -e "SHA256 Part:\n\`${shapart}\`" \
| gh release create "${release}" ${flag} ./njki -F-