Tarball should contain only one root folder (#23)
This commit is contained in:
parent
10efd09c36
commit
d56347064c
1 changed files with 15 additions and 10 deletions
25
.github/workflows/release-tarball.yml
vendored
25
.github/workflows/release-tarball.yml
vendored
|
|
@ -11,20 +11,25 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Create tarball
|
||||
- name: Get repository name
|
||||
run: |
|
||||
tag_name=${GITHUB_REF##*/}
|
||||
version=${tag_name#k}
|
||||
artifact_name="kotatogram-desktop-$version-full.tar.gz"
|
||||
echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}-$version-full
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
path: ${{ env.REPO_NAME }}
|
||||
|
||||
- name: Create tarball
|
||||
run: |
|
||||
artifact_name="$REPO_NAME.tar.gz"
|
||||
echo ::set-env name=ARTIFACT_NAME::$artifact_name
|
||||
|
||||
rm -rf .git
|
||||
tar -caf "../$artifact_name" .
|
||||
rm -rf $REPO_NAME/.git
|
||||
tar -caf $artifact_name $REPO_NAME
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
|
|
@ -33,6 +38,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ../${{ env.ARTIFACT_NAME }}
|
||||
asset_path: ./${{ env.ARTIFACT_NAME }}
|
||||
asset_name: ${{ env.ARTIFACT_NAME }}
|
||||
asset_content_type: application/octet-stream
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue