mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2024-12-24 14:34:39 +03:00
create release if needed in CI
This commit is contained in:
parent
351cf8bd2a
commit
f1211f9aa7
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@ -68,22 +68,25 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build, nix-build]
|
needs: [build, nix-build]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- id: data
|
- name: Retrieve version
|
||||||
uses: pozetroninc/github-action-get-latest-release@v0.7.0
|
run: sh ./.github/workflows/retrieve_version.sh
|
||||||
with:
|
|
||||||
repository: ${{ github.repository }}
|
|
||||||
|
|
||||||
- name: Upload files to a GitHub release
|
- name: Upload files to a GitHub release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: ncipollo/release-action@v1.13.0
|
||||||
with:
|
with:
|
||||||
file: dist/*
|
allowUpdates: true
|
||||||
tag: ${{ steps.data.outputs.release }}
|
artifacts: dist/*
|
||||||
overwrite: true
|
makeLatest: true
|
||||||
file_glob: true
|
name: ${{ env.release_name }}
|
||||||
|
replacesArtifacts: true
|
||||||
|
tag: ${{ env.tag_name }}
|
||||||
|
|
15
.github/workflows/retrieve_version.sh
vendored
Normal file
15
.github/workflows/retrieve_version.sh
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# install jq
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install jq
|
||||||
|
|
||||||
|
# get version
|
||||||
|
VERSION=$(jq -r '.version' version_info.json)
|
||||||
|
release_name="Beta $VERSION"
|
||||||
|
tag_name="v$VERSION"
|
||||||
|
|
||||||
|
#write variables to github env
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "release_name=$release_name" >> $GITHUB_ENV
|
||||||
|
echo "tag_name=$tag_name" >> $GITHUB_ENV
|
Loading…
Reference in New Issue
Block a user