Skip to content

Commit

Permalink
feat: Upload release asset. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Jan 16, 2024
1 parent 5df543f commit b713da8
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ jobs:
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}

- name: Upload descriptor file artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: adempiere-grpc-template-service.pb
path: build/descriptors/adempiere-grpc-template-service.pb

- name: Upload dist app zip artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: adempiere-grpc-template-service.zip
path: build/release/adempiere-grpc-template-service.zip

- name: Upload dist app zip.MD5 artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: adempiere-grpc-template-service.zip.MD5
path: build/release/adempiere-grpc-template-service.zip.MD5

- name: Upload dist app tar artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: adempiere-grpc-template-service.tar
path: build/release/adempiere-grpc-template-service.tar

- name: Upload dist app tar.MD5 artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: adempiere-grpc-template-service.tar.MD5
path: build/release/adempiere-grpc-template-service.tar.MD5
Expand All @@ -77,7 +77,14 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Upload Descriptor
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: adempiere-grpc-template-service.pb/adempiere-grpc-template-service.pb

- name: Upload zip
uses: skx/github-action-publish-binaries@master
Expand Down Expand Up @@ -108,6 +115,7 @@ jobs:
args: adempiere-grpc-template-service.tar.MD5/adempiere-grpc-template-service.tar.MD5



# Check secrets to push image in docker hub registry
check-docker-secrets:
name: Check if docker hub registry information was set on secrets
Expand Down Expand Up @@ -143,7 +151,7 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3
- name: Download build dist app
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: adempiere-grpc-template-service.zip
- name: Unzip Asset
Expand All @@ -168,7 +176,7 @@ jobs:
# TODO: Download .tar and add docker image without uncompress
# Publish docker multiplatform image in Docker Hub Registry to application
push-imame-dhr:
name: Push docker multiplatform image to Docker Hub
name: Push multiplatform docker image to Docker Hub
needs:
- check-docker-secrets
# Skip step based on secret
Expand All @@ -178,7 +186,7 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3
- name: Download build dist app
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: adempiere-grpc-template-service.zip
- name: Unzip Asset
Expand Down Expand Up @@ -233,7 +241,7 @@ jobs:
# TODO: Download .tar and add docker image without uncompress
# Publish docker multiplatform image in Docker Hub Registry to application
push-proxy-imame-dhr:
name: Push docker multiplatform image to Docker Hub
name: Push multiplatform proxy docker image to Docker Hub
needs:
- check-proxy-docker-secrets
# Skip step based on secret
Expand All @@ -244,7 +252,7 @@ jobs:
uses: actions/checkout@v3

- name: Download descriptor app
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: adempiere-grpc-template-service.pb
path: docker/
Expand All @@ -266,7 +274,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
file: docker/grpc_proxy.Dockerfile
platforms: linux/amd64,linux/amd64/v2,linux/arm64/v8
push: true
tags: |
Expand Down

0 comments on commit b713da8

Please sign in to comment.