Skip to content

Release v3-1

Release v3-1 #13

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]*-[0-9]*"
env:
SKF_SET_NAME: "${{ github.event.repository.name }}"
jobs:
skf-archive:
runs-on: ubuntu-latest
steps:
- name: Checkout sk set
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version number
run: |
GIT_TAG=$(git describe --tags --match 'v[0-9]*-[0-9]*')
SKF_SET_VERSION=${GIT_TAG#v}"
echo "SKF_SET_VERSION=${SKF_SET_VERSION} >> ${GITHUB_ENV}
echo "ARCHIVE_NAME=${SKF_SET_NAME}-${SKF_SET_VERSION}" >> ${GITHUB_ENV}
- name: Create archive
run: |
mkdir -p _build/${ARCHIVE_NAME}
cp $(find . -maxdepth 1 -not -type 'd') _build/${ARCHIVE_NAME}
cp skfiles/*.skf _build/${ARCHIVE_NAME}
cp extras/{spinw.hsd,wfc.hsd} _build/${ARCHIVE_NAME}
tar -C _build -c -v -J -f ${ARCHIVE_NAME}.tar.xz ${ARCHIVE_NAME}
cp extras/spinw.hsd ${ARCHIVE_NAME}.spinw.hsd
cp extras/wfc.hsd ${ARCHIVE_NAME}.wfc.hsd
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCHIVE_NAME }}.tar.xz
path: ${{ env.ARCHIVE_NAME }}.tar.xz
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
# name: ${{ env.ARCHIVE_NAME }}
files: |
${{ env.ARCHIVE_NAME }}.tar.xz
${{ env.ARCHIVE_NAME }}.spinw.hsd
${{ env.ARCHIVE_NAME }}.wfc.hsd
body_path: README.md