chocolatey-packages/.gitea/workflows/build.yml
Adam Goldsmith 331c3d7878
All checks were successful
/ Build-Chocolatey-Packages (push) Successful in 1m38s
Add temporary workaround for broken LFS checkout
2023-05-03 10:17:16 -04:00

54 lines
1.6 KiB
YAML

on:
push:
branches:
- main
env:
NUGET_URL: https://git.claremontmakerspace.org/api/packages/${{ github.repository_owner }}/nuget/index.json
jobs:
Build-Chocolatey-Packages:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Workaround for broken LFS checkout, see https://gitea.com/gitea/act_runner/issues/164
- name: Checkout LFS
run: |
UrlBase=$GITHUB_SERVER_URL
UrlLfsBase=$UrlBase/${{ gitea.repository }}.git/info/lfs/objects
git config --local http.${UrlLfsBase}/batch.extraheader "$(git config --get --local http.$UrlBase/.extraheader)"
git config --local http.${UrlLfsBase}/.extraheader ''
git config --local lfs.transfer.maxretries 1
git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }}
git lfs checkout
- name: Setup dotnet
uses: https://github.com/actions/setup-dotnet@v3
with:
dotnet-version: 7
- name: Chocolatey Pack
uses: docker://chocolatey/choco:latest
with:
args: |
sh -c 'for package in */
do
(
cd "$package"
echo "Packing $package"
choco pack --no-color
)
done'
- name: Nuget Push
run: |
for package in */*.nupkg
do
echo "Pushing $package"
dotnet nuget push --source $NUGET_URL --api-key "${{ secrets.REGISTRY_TOKEN }}" "$package" --skip-duplicate
done
env:
DOTNET_CLI_TELEMETRY_OPTOUT: "true"