ci: actually release

This commit is contained in:
Jozef Steinhübl 2024-07-19 17:32:21 +02:00
parent eb3ed250fc
commit b0679dc83a
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F

View file

@ -1,6 +1,10 @@
name: Release name: Release
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: "lsp version"
required: true
jobs: jobs:
check: check:
@ -70,15 +74,18 @@ jobs:
if [[ "${{ matrix.archive }}" == "tar.gz" ]]; then if [[ "${{ matrix.archive }}" == "tar.gz" ]]; then
ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.tar.gz" ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.tar.gz"
tar -czvf "${ARCHIVE_PATH}" -C "tmp/${ARCHIVE_NAME}" . tar -czvf "${ARCHIVE_PATH}" -C "tmp" "${ARCHIVE_NAME}"
else else
ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.zip" ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.zip"
cd tmp
if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
7z a "${ARCHIVE_PATH}" "tmp/${ARCHIVE_NAME}" 7z a "../${ARCHIVE_PATH}" "${ARCHIVE_NAME}"
else else
zip -r "${ARCHIVE_PATH}" "tmp/${ARCHIVE_NAME}" zip -r "../${ARCHIVE_PATH}" "/${ARCHIVE_NAME}"
fi fi
cd ..
fi fi
echo "archive_name=${ARCHIVE_NAME}" >> $GITHUB_OUTPUT echo "archive_name=${ARCHIVE_NAME}" >> $GITHUB_OUTPUT
@ -90,3 +97,26 @@ jobs:
name: ${{ steps.vars.outputs.archive_name }} name: ${{ steps.vars.outputs.archive_name }}
path: | path: |
${{ steps.vars.outputs.archive_path }} ${{ steps.vars.outputs.archive_path }}
release:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Create the release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ inputs.version }}
name: v${{ inputs.version }}
draft: true
files: |
artifacts/*