Skip to content

Commit

Permalink
add vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
peeweep committed Nov 12, 2024
1 parent a2a6804 commit 6faa38c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
description: "(optional)source directory to perform scripts, default to empty string"
default: ''

VENDORDIR:
description: "(optional)S in ebuild: ddns-go-6.7.6, disable default"
default: ''

jobs:
Generator:
permissions: write-all # required by push tag
Expand Down Expand Up @@ -70,15 +74,16 @@ jobs:
env:
P: ${{ inputs.P }}
WORKDIR: ${{ inputs.WORKDIR }}
VENDORDIR: ${{ inputs.VENDORDIR }}
run: |
git tag ${P} -m "${P}-deps.tar.xz ${P}-vendor.tar.xz"
cd "input/${WORKDIR}"
GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
tar --create --auto-compress --file /tmp/${P}-deps.tar.xz go-mod
if [ ! -f go.work ]; then
if [[ ! -f go.work && x"${VENDORDIR}"" != x"" ]]; then
rm -rf go-mod
go mod vendor -modcacherw -o ${P}/vendor
tar --create --auto-compress --file /tmp/${P}-vendor.tar.xz ${P}/vendor
go mod vendor -modcacherw -o ${VENDORDIR}/vendor
tar --create --auto-compress --file /tmp/${VENDORDIR}-vendor.tar.xz ${VENDORDIR}/vendor
fi
- name: Generate javascript node_modules
Expand Down Expand Up @@ -118,12 +123,19 @@ jobs:
force: true
tags: true

- name: upload goland deps to release artifaces
- name: upload golang deps to release artifaces
if: inputs.LANG == 'golang'
uses: softprops/action-gh-release@v2
with:
files: |
/tmp/${{ inputs.P }}-deps.tar.xz
tag_name: ${{ inputs.P }}

- name: upload golang vendor to release artifaces
if: inputs.VENDORDIR != ''
uses: softprops/action-gh-release@v2
with:
files: |
/tmp/${{ inputs.P }}-vendor.tar.xz
tag_name: ${{ inputs.P }}

Expand Down

0 comments on commit 6faa38c

Please sign in to comment.