-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (90 loc) · 2.54 KB
/
ci.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format:
uses: ./.github/workflows/format.yml
secrets: inherit
lint:
uses: ./.github/workflows/lint.yml
linux:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu:latest
run: apt-get update -q && apt-get install -y -q curl sudo
- os: debian:latest
run: apt-get update -q && apt-get install -y -q curl sudo
# - os: quay.io/centos/centos:stream
- os: fedora:latest
run: dnf clean all && dnf install -y -q curl sudo
runs-on: ubuntu-latest
container: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: ${{ matrix.run }}
- uses: nick-fields/retry@v2
name: Chezmoi init & apply
with:
timeout_minutes: 10
max_attempts: 3
retry_on: error
command: ./install.sh
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: nick-fields/retry@v2
name: Chezmoi init & apply
with:
timeout_minutes: 10
max_attempts: 3
retry_on: error
command: ./install.sh
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: nick-fields/retry@v2
name: Chezmoi init & apply
with:
shell: pwsh
timeout_minutes: 10
max_attempts: 3
retry_on: error
command: |
(irm -useb https://get.chezmoi.io/ps1) | powershell -c -
bin/chezmoi.exe init --apply --source $Env:GITHUB_WORKSPACE
release:
needs:
- format
- lint
- linux
- macos
- windows
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
package-name: dotfiles
- uses: actions/checkout@v4
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Latest Stable Release"
git push origin stable