This repository was archived by the owner on Sep 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 goarch : ["386", amd64, arm64]
2222 exclude :
2323 - goarch : " 386"
24- goos : darwin
24+ goos : darwin
2525 - goarch : arm64
2626 goos : windows
2727 - goarch : arm64
3333 run : |
3434 echo VERSION=$(basename ${GITHUB_REF}) >> ${GITHUB_ENV}
3535 echo $(basename ${GITHUB_REF})
36-
36+
3737 - name : Generate Binary
3838 uses : wangyoucao577/go-release-action@v1.22
3939 with :
4242 goos : ${{ matrix.goos }}
4343 goarch : ${{ matrix.goarch }}
4444 # binary_name: cli
45- ldflags : -X "github.com/${{ github.repository }}/cmd.Version=${{ env.VERSION }}" -X "github.com/${{ github.repository }}/nhost.REPOSITORY=${{ github.repository }}"
45+ ldflags : -X "github.com/${{ github.repository }}/cmd.Version=${{ env.VERSION }}" -X "github.com/${{ github.repository }}/nhost.REPOSITORY=${{ github.repository }}"
46+
47+ - uses : actions/checkout@v3
48+ with :
49+ ref : gh-pages
50+ - name : Generate releases.json
51+ shell : bash
52+ env :
53+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
54+ run : |
55+ gh api repos/nhost/cli/releases > releases.json
56+ - name : Check if there are changes
57+ id : changes
58+ shell : bash
59+ run : |
60+ if [[ -z "$(git status --porcelain . )" ]]; then
61+ echo "::set-output name=changed::0"
62+ else
63+ echo "::set-output name=changed::1"
64+ fi
65+ - name : Committing releases.json
66+ shell : bash
67+ if : steps.changes.outputs.changed == 1
68+ run : |
69+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
70+ git config --local user.name "github-actions[bot]"
71+ git add .
72+ git commit -m "" --allow-empty-message
73+ - name : Push changes
74+ uses : ad-m/github-push-action@master
75+ if : steps.changes.outputs.changed == 1
76+ with :
77+ github_token : ${{ secrets.GITHUB_TOKEN }}
78+ branch : gh-pages
79+ force : true
You can’t perform that action at this time.
0 commit comments