Fix ci
Some checks failed
Build / build-windows (push) Has been cancelled
Build / build-linux (push) Has been cancelled

This commit is contained in:
Alexandr Bogomyakov
2024-08-07 20:10:49 +03:00
committed by GitHub
parent 207717491c
commit 0bba91486e

View File

@ -61,12 +61,15 @@ jobs:
needs: [build-linux]
runs-on: ubuntu-latest
steps:
# - name: Checkout
# uses: actions/checkout@v4
- name: Get the version (git tag)
id: get_version
run: |
echo ${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=FULL_TAG::${GITHUB_REF/refs\/tags\//}
- name: Get the repo data (git tag)
id: get_repo_data
run: |
@ -74,31 +77,25 @@ jobs:
echo ::set-output name=AUTHOR::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')
echo ::set-output name=REPO_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
shell: bash
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Prepare release downloading
run: |
mkdir artifacts
- name: Download Linux binary
uses: actions/download-artifact@v4
with:
name: desubot
path: ./artifacts/
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./artifacts/*
asset_name: desubot-linux-amd64
asset_content_type: application/octet-stream
- name: Build
run: echo ${{ github.sha }} > Release.txt
- name: Test
run: cat Release.txt
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: './artifacts/*'