-
Notifications
You must be signed in to change notification settings - Fork 166
85 lines (83 loc) · 2.6 KB
/
release.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
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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- run: gem install ronn
- run: ronn ./man/actionlint.1.ronn
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post-release download check
run: bash ./scripts/download-actionlint.bash "${GITHUB_REF#refs/tags/v}"
- name: Clone nested repository to make version bump commit
uses: actions/checkout@v4
with:
path: ./tmp-actionlint-for-update-ver
ref: main
fetch-depth: 0
- name: Update version in download script
run: |
set -x
ver="${GITHUB_REF#refs/tags/v}"
cd ./tmp-actionlint-for-update-ver
sed -i -E "s/version=\"[0-9]+\\.[0-9]+\\.[0-9]+\"/version=\"${ver}\"/" ./scripts/download-actionlint.bash
git diff
git add ./scripts/download-actionlint.bash
git -c user.email='41898282+github-actions[bot]@users.noreply.github.com' -c user.name='github-actions[bot]' commit -m "update version to $ver in download-actionlint.bash"
git log -n 1
git push
winget:
runs-on: ubuntu-latest
needs: release
steps:
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: rhysd.actionlint
installers-regex: '_windows_\w+\.zip$'
token: ${{ secrets.WINGET_TOKEN }}
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get tag name
id: tag
run: |
echo "name=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: rhysd
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
build-args: |
GOLANG_VER=1.23
ACTIONLINT_VER=${{ steps.tag.outputs.name }}
push: true
tags: |
rhysd/actionlint:${{ steps.tag.outputs.name }}
rhysd/actionlint:latest