-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (64 loc) · 2.61 KB
/
prerelease.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
name: Global prerelease
# Push the actual tag to the global-tz branch (not the iana-tz branch!)
# Then push the tag suffixed by -prerelease to the main branch
on:
push:
branches:
- '20*-prerelease'
tags:
- '20*-prerelease'
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- name: Git setup
run: |
git config --global user.email "[email protected]"
git config --global user.name "Stephen Colebourne"
git config --global advice.detachedHead false
git config --global init.defaultBranch "main"
- name: Checkout global-tz
uses: actions/checkout@v4
with:
ref: 'global-tz'
fetch-depth: 0
- name: Find version
run: |
MAIN_VERSION1=${GITHUB_REF/#refs\/tags\//}
MAIN_VERSION=${MAIN_VERSION1/#refs\/heads\//}
ACTUAL_VERSION=${MAIN_VERSION%-prerelease}
echo "TAG_VERSION=${ACTUAL_VERSION}" >> $GITHUB_ENV
echo "MAIN_VERSION=${MAIN_VERSION}"
echo "ACTUAL_VERSION=${ACTUAL_VERSION}"
- name: Install lzip
run: |
sudo apt-get update -y
sudo apt-get install -y lzip
- name: Build
run: |
echo ${{ env.TAG_VERSION }}
git checkout global-tz
git fetch --all --tags --prune
git tag --list
git reset --hard ${{ env.TAG_VERSION }}
ls -la
git describe --abbrev=7 --dirty
git describe --match "[0-9][0-9][0-9][0-9][a-z]*" --abbrev=7 --dirty
git describe --match '[0-9][0-9][0-9][0-9][a-z]*' --abbrev=7 --dirty
make check_mild VERSION="${{ env.TAG_VERSION }}" ZONETABLES="zone.tab"
make tarballs VERSION="${{ env.TAG_VERSION }}"
ls -la
sha512sum tzcode${{ env.TAG_VERSION }}.tar.gz > tzcode${{ env.TAG_VERSION }}.tar.gz.sha512
sha512sum tzdata${{ env.TAG_VERSION }}.tar.gz > tzdata${{ env.TAG_VERSION }}.tar.gz.sha512
sha512sum tzdb-${{ env.TAG_VERSION }}.tar.lz > tzdb-${{ env.TAG_VERSION }}.tar.lz.sha512
sha512sum tzdata${{ env.TAG_VERSION }}-rearguard.tar.gz > tzdata${{ env.TAG_VERSION }}-rearguard.tar.gz.sha512
ls -la
- name: Publish artifacs to inspect manually
uses: actions/upload-artifact@v4
with:
name: Output global-tz files
retention-days: 5
path: tz*${{ env.TAG_VERSION }}*.tar.*
# Use git rest --hard to ensure the state is what make expects, if this is not done the version file is incorrect in the output
# ZONETABLES is set to remove zone1970.tab, as the Makefile validation doesn't cover our use case
# check_mild is used instead of check, as the Makefile validation doesn't cover our use case