mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 05:52:40 +03:00
actions: fix source package workflow
This commit is contained in:
parent
c58db92b64
commit
26eaaa758d
17
.github/workflows/source-package.yml
vendored
17
.github/workflows/source-package.yml
vendored
@ -1,25 +1,20 @@
|
||||
name: Build a source package
|
||||
|
||||
# TODO: enable this workflow for pull_request (will require a different way to do the archive)
|
||||
on: [push]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Don't use checkout, we need a full clone for this workflow
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git clone https://github.com/yubico/yubioath-desktop
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Build a .tar.gz source package
|
||||
run: |
|
||||
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
|
||||
cd yubioath-desktop
|
||||
git checkout $REF
|
||||
git archive --format=tar.gz -o yubioath-desktop-$REF.tar.gz --prefix yubioath-desktop/ $REF
|
||||
cd ..
|
||||
tar zcvf yubioath-desktop-$REF.tar.gz --exclude-vcs yubioath-desktop
|
||||
mkdir deploy
|
||||
mv yubioath-desktop-$REF.tar.gz deploy
|
||||
|
||||
@ -27,4 +22,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: yubioath-desktop-source-package
|
||||
path: yubioath-desktop/deploy
|
||||
path: ../deploy
|
||||
|
Loading…
Reference in New Issue
Block a user