mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2024-12-23 22:22:59 +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
|
||||
needs: [build, nix-build]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
path: dist
|
||||
|
||||
- id: data
|
||||
uses: pozetroninc/github-action-get-latest-release@v0.7.0
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
- name: Retrieve version
|
||||
run: sh ./.github/workflows/retrieve_version.sh
|
||||
|
||||
- name: Upload files to a GitHub release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
uses: ncipollo/release-action@v1.13.0
|
||||
with:
|
||||
file: dist/*
|
||||
tag: ${{ steps.data.outputs.release }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
allowUpdates: true
|
||||
artifacts: dist/*
|
||||
makeLatest: 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