Skip to content

Commit 0084358

Browse files
authored
update to address windows directory not empty error (#1328)
* update to address windows directory no empty error. also expand slack notification for errors on more jobs * fix for goreleaser-pro to no re-install, but use existing goreleaser. Fix to on-failure to always show error if failure() is triggered. * correct naming of goreleaser binary to call
1 parent 3f5cf59 commit 0084358

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/go.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,24 @@ jobs:
149149
run: go mod download
150150
working-directory: src
151151

152-
- name: Run GoReleaser (Linux)
152+
- name: Install GoReleaser Pro
153153
uses: goreleaser/goreleaser-action@v6
154154
with:
155-
distribution: goreleaser-pro # either 'goreleaser' (default) or 'goreleaser-pro'
156-
# version: latest
157-
args: release --split ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot' || '' }} ${{ github.event_name == 'schedule' && '--nightly' || ''}}
158-
workdir: src
155+
distribution: goreleaser-pro
156+
install-only: true
157+
env:
158+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
159+
160+
- name: Run GoReleaser (Linux)
161+
run: goreleaser release --split ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot' || '' }} ${{ github.event_name == 'schedule' && '--nightly' || ''}}
162+
working-directory: src
159163
env:
160164
GGOOS: linux
161165
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
162166

163167
- name: Run GoReleaser (Windows)
164-
uses: goreleaser/goreleaser-action@v6
165-
with:
166-
distribution: goreleaser-pro # either 'goreleaser' (default) or 'goreleaser-pro'
167-
# version: latest
168-
args: release --split ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot' || '' }} ${{ github.event_name == 'schedule' && '--nightly' || ''}}
169-
workdir: src
168+
run: goreleaser release --split ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot' || '' }} ${{ github.event_name == 'schedule' && '--nightly' || ''}}
169+
working-directory: src
170170
env:
171171
GGOOS: windows
172172
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
@@ -396,10 +396,10 @@ jobs:
396396
if: failure() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
397397
needs: [go-release, post-release, nix-shell-test, push-docker]
398398
steps:
399-
- name: Slack Notification
400-
uses: rtCamp/action-slack-notify@v2
401-
env:
402-
MSG_MINIMAL: actions url
403-
SLACK_COLOR: ${{ job.status }}
404-
SLACK_TITLE: Defang CLI workflow failed
405-
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFIER_WEBHOOK_URL }}
399+
- name: Slack Notification
400+
uses: rtCamp/action-slack-notify@v2
401+
env:
402+
MSG_MINIMAL: actions url
403+
SLACK_COLOR: error
404+
SLACK_TITLE: Defang CLI workflow failed
405+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFIER_WEBHOOK_URL }}

0 commit comments

Comments
 (0)