Skip to content

Commit

Permalink
ci: actually release
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Jul 19, 2024
1 parent eb3ed25 commit b0679dc
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "lsp version"
required: true

jobs:
check:
Expand Down Expand Up @@ -70,15 +74,18 @@ jobs:
if [[ "${{ matrix.archive }}" == "tar.gz" ]]; then
ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.tar.gz"
tar -czvf "${ARCHIVE_PATH}" -C "tmp/${ARCHIVE_NAME}" .
tar -czvf "${ARCHIVE_PATH}" -C "tmp" "${ARCHIVE_NAME}"
else
ARCHIVE_PATH="tmp/${ARCHIVE_NAME}.zip"
cd tmp
if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
7z a "${ARCHIVE_PATH}" "tmp/${ARCHIVE_NAME}"
7z a "../${ARCHIVE_PATH}" "${ARCHIVE_NAME}"
else
zip -r "${ARCHIVE_PATH}" "tmp/${ARCHIVE_NAME}"
zip -r "../${ARCHIVE_PATH}" "/${ARCHIVE_NAME}"
fi
cd ..
fi
echo "archive_name=${ARCHIVE_NAME}" >> $GITHUB_OUTPUT
Expand All @@ -90,3 +97,26 @@ jobs:
name: ${{ steps.vars.outputs.archive_name }}
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/*

0 comments on commit b0679dc

Please sign in to comment.