Get the folder name with another way
This commit is contained in:
@@ -20,10 +20,6 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|
||||||
env:
|
|
||||||
APP_NAME: 'addon_name'
|
|
||||||
NAME_PACKAGE: 'addon_name.zip'
|
|
||||||
|
|
||||||
|
|
||||||
# Execute this command
|
# Execute this command
|
||||||
jobs:
|
jobs:
|
||||||
@@ -38,20 +34,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
|
|
||||||
# Update the bl info version, update the init file and push if needed
|
|
||||||
- name: Change version number in the bl info addon data
|
|
||||||
run: python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
# Get the local folder name
|
# Get the local folder name
|
||||||
- name: Setup package name
|
- name: Setup package name
|
||||||
|
id: folder
|
||||||
run: |
|
run: |
|
||||||
echo "With python, get a folder name"
|
echo "With python, get a folder name"
|
||||||
echo "Default env variable ${{env.APP_NAME}}"
|
|
||||||
python '.github/package.py'
|
python '.github/package.py'
|
||||||
echo "::set-output name=APP_NAME::$(echo python '.github/package.py')"
|
echo "::set-output name=folder::$(echo python '.github/package.py')"
|
||||||
echo "show env variable app name ${{env.APP_NAME}}"
|
echo "::set-output name=package::$(echo python '.github/package.py'.zip)"
|
||||||
echo "::set-output name=changelog::$(echo python '.github/package.py'.zip)"
|
|
||||||
echo "show env variable package ${{env.NAME_PACKAGE}}"
|
# Update the bl info version, update the init file and push if needed
|
||||||
|
- name: Change version number in the bl info addon data
|
||||||
|
run: python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ steps.folder.outputs.folder }}
|
||||||
|
|
||||||
- name: Commit the previous update
|
- name: Commit the previous update
|
||||||
uses: actions-js/push@v1.3
|
uses: actions-js/push@v1.3
|
||||||
@@ -68,18 +62,18 @@ jobs:
|
|||||||
- name: Create zip archive release
|
- name: Create zip archive release
|
||||||
run: |
|
run: |
|
||||||
cd '${{ github.workspace }}'
|
cd '${{ github.workspace }}'
|
||||||
zip -r '${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}' ${{ env.APP_NAME }}
|
zip -r '${{ github.workspace }}/releases/${{ steps.folder.outputs.package }}' ${{ steps.folder.outputs.folder }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ env.NAME_PACKAGE }}
|
name: ${{ steps.folder.outputs.package }}
|
||||||
path: ${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}
|
path: ${{ github.workspace }}/releases/${{ steps.folder.outputs.package }}
|
||||||
|
|
||||||
- name: Update the github release
|
- name: Update the github release
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: johnwbyrd/update-release@v1.0.0
|
uses: johnwbyrd/update-release@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: '${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}'
|
files: '${{ github.workspace }}/releases/${{ steps.folder.outputs.package }}'
|
||||||
release: ${{ inputs.name_version }}
|
release: ${{ inputs.name_version }}
|
||||||
tag: ${{ inputs.name_version }}
|
tag: ${{ inputs.name_version }}
|
||||||
Reference in New Issue
Block a user