-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (62 loc) · 1.87 KB
/
Build.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
---
name: Build
on:
pull_request:
workflow_dispatch:
inputs:
tzdata_version:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
# These permissions are needed to:
# - Create PRs: https://github.com/marketplace/actions/create-pull-request#workflow-permissions
permissions:
contents: write
pull-requests: write
env:
JULIA_PROJECT: gen
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: julia-actions/setup-julia@v1
with:
version: "1"
- uses: julia-actions/cache@v1
- name: Instantiate
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.instantiate()
- name: Build tzdata
id: build
shell: julia --color=yes {0}
run: |
include(joinpath(pwd(), "gen", "make.jl"))
(; tarball_path, tarball_sha256, new_version, commit_message) = update_tzdata()
key = basename(tarball_path) * "-" * tarball_sha256
@show key tarball_path commit_message
open(ENV["GITHUB_OUTPUT"], "a") do io
println(io, "key=$(basename(tarball_path))-$(tarball_sha256)")
println(io, "tarball_path=$tarball_path")
println(io, "commit_message=$commit_message")
end
- name: Debug
run: |
echo "${{ steps.build.outputs.tarball_path }}"
git diff
- uses: actions/upload-artifact@v4
id: action-artifact
with:
name: ${{ steps.build.outputs.key }}
path: ${{ steps.build.outputs.tarball_path }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
Project.toml
Artifacts.toml
commit-message: ${{ steps.build.outputs.commit_message }}
branch: gh/update-tzdata