-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.29 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build package
on: [push, pull_request]
jobs:
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12.6'
- name: Build
shell: cmd
run: choco pack -v
- name: Install
shell: cmd
run: choco install dvc --debug --verbose --source "'.;https://community.chocolatey.org/api/v2/'"
- name: Test
shell: cmd
run: |
refreshenv
dvc doctor
- name: Publish
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
shell: bash
env:
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
run: |
choco apikey --key $CHOCO_API_KEY --source https://push.chocolatey.org/
choco push dvc*.nupkg --source https://push.chocolatey.org/
notify:
if: github.ref == 'refs/heads/main' && failure()
needs: [windows]
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2.3.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'Package build failed for ${{ github.repository }}'
SLACK_TITLE: CI Status
SLACK_USERNAME: dvc-pkg-build