Skip to content

Commit 66b3f38

Browse files
authored
Change template to Green (#1)
* Change template to Green * Update LICENSE
1 parent 1fd28c4 commit 66b3f38

File tree

8 files changed

+198
-86
lines changed

8 files changed

+198
-86
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@ on:
44
schedule:
55
- cron: 0 0 * * *
66
workflow_dispatch:
7-
7+
88
jobs:
99
CompatHelper:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
actions: write
13+
contents: read
1114
steps:
12-
- name: Pkg.add("CompatHelper")
13-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
14-
- name: CompatHelper.main()
15+
- uses: actions/checkout@v4
16+
- uses: julia-actions/add-julia-registry@v2
17+
with:
18+
key: ${{ secrets.SSH_PRIVATE_KEY }}
19+
registry: bhftbootcamp/Green
20+
- uses: julia-actions/setup-julia@v2
21+
- uses: julia-actions/cache@v2
22+
- name: Configure CompatHelper
23+
run: |
24+
julia -e '
25+
using Pkg
26+
Pkg.add("CompatHelper")
27+
using CompatHelper
28+
CompatHelper.main(use_existing_registries = true)
29+
'
1530
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
18-
run: julia -e 'using CompatHelper; CompatHelper.main()'
31+
GITHUB_TOKEN: ${{ github.token }} # Token required to create a pull request to the same repository

.github/workflows/Coverage.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions:
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- '1'
27+
- '1.8'
28+
- '1.9'
29+
os:
30+
- ubuntu-latest
31+
arch:
32+
- x64
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: julia-actions/add-julia-registry@v2
36+
with:
37+
key: ${{ secrets.SSH_PRIVATE_KEY }}
38+
registry: bhftbootcamp/Green
39+
- uses: julia-actions/setup-julia@v2
40+
with:
41+
version: ${{ matrix.version }}
42+
arch: ${{ matrix.arch }}
43+
- uses: julia-actions/cache@v2
44+
- uses: julia-actions/julia-buildpkg@v1
45+
- uses: julia-actions/julia-runtest@v1
46+
- uses: julia-actions/julia-processcoverage@v1
47+
- uses: codecov/codecov-action@v5
48+
env:
49+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
50+
with:
51+
files: lcov.info
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
12+
jobs:
13+
doc-preview-cleanup:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: gh-pages
22+
- name: Delete preview and history + push changes
23+
run: |
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "documenter@juliadocs.github.io"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
32+
env:
33+
preview_dir: previews/PR${{ github.event.number }}
Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,12 @@
1-
name: CI
1+
name: Documenter
22

33
on:
44
push:
5-
branches:
6-
- master
7-
tags: ['*']
5+
tags: [v*]
86
pull_request:
9-
workflow_dispatch:
10-
11-
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
147

158
jobs:
16-
test:
17-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
18-
runs-on: ${{ matrix.os }}
19-
timeout-minutes: 60
20-
permissions:
21-
actions: write
22-
contents: read
23-
strategy:
24-
fail-fast: false
25-
matrix:
26-
version:
27-
- '1'
28-
- '1.8'
29-
- '1.9'
30-
- '1.10'
31-
os:
32-
- ubuntu-latest
33-
arch:
34-
- x64
35-
steps:
36-
- uses: actions/checkout@v4
37-
- uses: julia-actions/setup-julia@v2
38-
with:
39-
version: ${{ matrix.version }}
40-
arch: ${{ matrix.arch }}
41-
- uses: julia-actions/cache@v2
42-
- uses: julia-actions/julia-buildpkg@v1
43-
- uses: julia-actions/julia-runtest@v1
44-
- uses: julia-actions/julia-processcoverage@v1
45-
- uses: codecov/codecov-action@v5
46-
env:
47-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
48-
with:
49-
files: lcov.info
50-
51-
docs:
9+
Documenter:
5210
permissions:
5311
contents: write
5412
statuses: write
@@ -58,10 +16,14 @@ jobs:
5816
runs-on: ubuntu-latest
5917
steps:
6018
- uses: actions/checkout@v4
19+
- uses: julia-actions/add-julia-registry@v2
20+
with:
21+
key: ${{ secrets.SSH_PRIVATE_KEY }}
22+
registry: bhftbootcamp/Green
6123
- uses: julia-actions/setup-julia@latest
6224
- uses: julia-actions/cache@v2
6325
- name: Install dependencies
64-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(; path = pwd())); Pkg.instantiate();'
26+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path = pwd())); Pkg.instantiate()'
6527
- name: Build and deploy
6628
env:
6729
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/Registry.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Update registry
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
registry:
11+
name: Update registry
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: write
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: julia-actions/add-julia-registry@v2
19+
with:
20+
key: ${{ secrets.SSH_PRIVATE_KEY }}
21+
registry: bhftbootcamp/Green
22+
- uses: julia-actions/setup-julia@v2
23+
with:
24+
version: 1.9
25+
- uses: julia-actions/cache@v2
26+
- name: Configure Git
27+
run: |
28+
sudo apt-get update -qq && sudo apt-get install -y -qq git
29+
git config --global user.name github-actions[bot]
30+
git config --global user.email github-actions[bot]@users.noreply.github.com
31+
- name: Updating package version in registers
32+
run: |
33+
julia -e '
34+
using Pkg
35+
36+
Pkg.add("LocalRegistry")
37+
Pkg.develop(url = "git@github.com:${{ github.repository }}.git")
38+
39+
using LocalRegistry
40+
using TOML
41+
42+
package_name = match(r"^.*/(.*?)(\.jl)?(\.git)?$", "${{ github.repository }}")
43+
package_name == nothing && error("Invalid package name: ${{ github.repository }}")
44+
package_name = package_name[1]
45+
46+
package_dir = joinpath(DEPOT_PATH[1], "dev", package_name)
47+
project_toml = TOML.parsefile(joinpath(package_dir, "Project.toml"))
48+
version = VersionNumber(project_toml["version"])
49+
50+
LocalRegistry.register(
51+
package_name,
52+
repo = "https://github.com/${{ github.repository }}.git",
53+
registry = "git@github.com:bhftbootcamp/Green.git",
54+
ignore_reregistration = true,
55+
)
56+
57+
run(Cmd(`git tag -f "v$version"`, dir = package_dir))
58+
run(Cmd(`git push --force origin "v$version"`, dir = package_dir))
59+
'

.github/workflows/ReleaseTag.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release:
14+
name: Release pushed tag
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Create release
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
tag: ${{ github.ref_name }}
21+
run: |
22+
gh release create "$tag" \
23+
--repo="$GITHUB_REPOSITORY" \
24+
--title="v${tag#v}" \
25+
--generate-notes

.github/workflows/TagBot.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bhftbootcamp.github.io/LibTDJSON.jl/stable/)
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bhftbootcamp.github.io/LibTDJSON.jl/dev/)
5-
[![Build Status](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/CI.yml?query=branch%3Amaster)
5+
[![Build Status](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/Coverage.yml/badge.svg?branch=master)](https://github.com/bhftbootcamp/LibTDJSON.jl/actions/workflows/Coverage.yml?query=branch%3Amaster)
66
[![Coverage](https://codecov.io/gh/bhftbootcamp/LibTDJSON.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/bhftbootcamp/LibTDJSON.jl)
7-
[![Registry](https://img.shields.io/badge/registry-General-4063d8)](https://github.com/JuliaRegistries/General)
7+
[![Registry](https://img.shields.io/badge/registry-Green-green)](https://github.com/bhftbootcamp/Green)
88

99
Wrapper for TDLib’s C JSON [interface](https://core.telegram.org/tdlib/docs/td__json__client_8h.html) for building Telegram clients in Julia.
1010

0 commit comments

Comments
 (0)