feat(build): artifacts & docker image (#169)
This commit is contained in:
parent
f367d198f9
commit
4806a285b6
@ -1,4 +1,4 @@
|
|||||||
name: Build
|
name: Main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -166,13 +166,19 @@ jobs:
|
|||||||
needs: [ build-windows, build-macos, build-linux ]
|
needs: [ build-windows, build-macos, build-linux ]
|
||||||
if: startsWith(github.ref, 'refs/tags/') && (github.event.base_ref == 'refs/heads/prod' || github.event.base_ref == 'refs/heads/dev')
|
if: startsWith(github.ref, 'refs/tags/') && (github.event.base_ref == 'refs/heads/prod' || github.event.base_ref == 'refs/heads/dev')
|
||||||
steps:
|
steps:
|
||||||
- name: Check out files
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download Binaries
|
- name: Download Binaries
|
||||||
uses: actions/download-artifact@v3.0.2
|
uses: actions/download-artifact@v3
|
||||||
with:
|
|
||||||
name: windows-x64-release
|
- name: Compress Binaries
|
||||||
|
run: |
|
||||||
|
for dir in */; do
|
||||||
|
if [[ $dir == *"windows"* ]]; then
|
||||||
|
zip -r "${dir%/}.zip" "$dir"
|
||||||
|
else
|
||||||
|
tar -czvf "${dir%/}.tar.gz" "$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
@ -181,4 +187,20 @@ jobs:
|
|||||||
prerelease: false
|
prerelease: false
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
gsc-tool.exe
|
*.zip
|
||||||
|
*.tar.gz
|
||||||
|
|
||||||
|
- name: Checkout Dockerfile
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
sparse-checkout: |
|
||||||
|
Dockerfile
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
|
- name: Build and Publish Docker Image
|
||||||
|
uses: VaultVulp/gp-docker-action@1.6.0
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
image-name: gsc-tool
|
||||||
|
extract-git-tag: true
|
||||||
|
additional-image-tags: latest
|
@ -1,9 +1,7 @@
|
|||||||
FROM alpine:3.19
|
FROM alpine:3.19
|
||||||
|
|
||||||
# glibc compatibility
|
|
||||||
RUN apk add --no-cache gcompat libstdc++
|
RUN apk add --no-cache gcompat libstdc++
|
||||||
|
|
||||||
# copy gsc-tool
|
COPY --chmod=755 ./linux-x64-release/gsc-tool /usr/local/bin/
|
||||||
COPY --chmod=755 gsc-tool /usr/local/bin/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/gsc-tool"]
|
ENTRYPOINT ["/usr/local/bin/gsc-tool"]
|
Loading…
Reference in New Issue
Block a user