Update .github/workflows/build.yaml
This commit is contained in:
18
.github/workflows/build.yaml
vendored
18
.github/workflows/build.yaml
vendored
@@ -12,19 +12,10 @@ jobs:
|
|||||||
image: docker
|
image: docker
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/gitea:/tmp/gitea
|
- /tmp/gitea:/tmp/gitea
|
||||||
outputs:
|
|
||||||
version: ${{ steps.version.outputs.version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Repository
|
- name: Clone Repository
|
||||||
uses: ztimson/actions/clone@develop
|
uses: ztimson/actions/clone@develop
|
||||||
|
|
||||||
- name: Get Version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
VERSION=$(cat package.json | grep version | grep -Eo '[0-9][[:alnum:]\.\/\-]+')
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
echo $VERSION
|
|
||||||
|
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
run: |
|
run: |
|
||||||
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
|
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
|
||||||
@@ -51,18 +42,15 @@ jobs:
|
|||||||
- docker
|
- docker
|
||||||
container:
|
container:
|
||||||
image: git.zakscode.com/momentum/electron-builder:latest
|
image: git.zakscode.com/momentum/electron-builder:latest
|
||||||
env:
|
|
||||||
VERSION: ${{ needs.docker.outputs.version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build inside container
|
- name: Build inside container
|
||||||
run: |
|
run: |
|
||||||
if [ "${{github.ref_name}}" = "master" ]; then
|
if [ "${{github.ref_name}}" = "master" ]; then
|
||||||
/app/entrypoint.sh
|
/app/entrypoint.sh
|
||||||
ls /out
|
|
||||||
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-darwin-x64.zip \
|
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-darwin-x64.zip \
|
||||||
https://git.zakscode.com/api/packages/momentum/generic/electron/${{ env.VERSION }}/Momentum-darwin-x64.zip
|
https://git.zakscode.com/api/packages/momentum/generic/electron/latest/Momentum-darwin-x64.zip
|
||||||
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-linux-x64.zip \
|
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-linux-x64.zip \
|
||||||
https://git.zakscode.com/api/packages/momentum/generic/electron/${{ env.VERSION }}/Momentum-linux-x64.zip
|
https://git.zakscode.com/api/packages/momentum/generic/electron/latest/Momentum-linux-x64.zip
|
||||||
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-win32-x64.zip \
|
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-win32-x64.zip \
|
||||||
https://git.zakscode.com/api/packages/momentum/generic/electron/${{ env.VERSION }}/Momentum-win32-x64.zip
|
https://git.zakscode.com/api/packages/momentum/generic/electron/latest/Momentum-win32-x64.zip
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user