websoft9/.github/workflows/upload_artifact.yml

69 lines
2 KiB
YAML
Raw Normal View History

2023-07-21 07:19:59 +00:00
name: upload_artifact
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "version.json"
jobs:
upload_artifact:
name: Bupload_artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Check out code
- name: Read Plugin Version
2023-07-26 02:42:48 +00:00
id: update_data
2023-07-21 07:19:59 +00:00
run: |
version=$(jq -r '.VERSION' version.json)
echo version=$version
echo "VERSION=$version" >> $GITHUB_ENV
2023-07-25 05:36:50 +00:00
changelog=$(cat changelog_latest.md)
2023-07-26 02:42:48 +00:00
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "$changelog" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
2023-07-21 07:19:59 +00:00
mkdir websoft9 artifacts
cp -r docker websoft9
cp -r cockpit websoft9
cp -r scripts websoft9
cp -r install websoft9
cp -r docs websoft9
cp *.md websoft9
2023-07-21 07:19:59 +00:00
cp version.json websoft9
zip -r websoft9-$version.zip websoft9
2023-07-24 03:20:02 +00:00
cp websoft9-$version.zip artifacts
2023-07-24 09:55:37 +00:00
cp version.json artifacts
2023-07-26 08:20:55 +00:00
cp CHANGELOG.md artifacts
2023-07-24 03:20:02 +00:00
cp artifacts/websoft9-$version.zip artifacts/websoft9-latest.zip
2023-07-21 07:19:59 +00:00
- name: Upload To Azure Blob
uses: LanceMcCarthy/Action-AzureBlobUpload@v2
with:
connection_string: ${{ secrets.AZURE_STORAGE_ARTIFACT }}
container_name: release
source_folder: artifacts/
destination_folder: ./websoft9
delete_if_exists: true
fail_if_source_empty: true
2023-07-25 05:36:50 +00:00
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
2023-07-26 02:42:48 +00:00
files: /*
tag_name: v${{ env.VERSION }}
title: Release-v${{ env.VERSION }}
body: ${{ steps.update_data.outputs.CHANGELOG }}
2023-07-25 05:36:50 +00:00
draft: false
prerelease: true
2023-07-26 02:42:48 +00:00
# - name: Commit and push changes
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Push to github main