Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44fbca2

Browse files
committed
Update job to publish nightly release
1 parenta689e99 commit44fbca2

File tree

2 files changed

+144
-2
lines changed

2 files changed

+144
-2
lines changed

‎.github/workflows/nightly.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name:Nightly Release
2+
3+
on:
4+
schedule:
5+
# Runs at midnight UTC
6+
-cron:'0 0 * * *'
7+
# Allow manual triggering
8+
workflow_dispatch:
9+
10+
jobs:
11+
sync-develop:
12+
runs-on:ubuntu-latest
13+
steps:
14+
-name:Checkout
15+
uses:actions/checkout@v4
16+
with:
17+
ref:develop
18+
fetch-depth:0
19+
persist-credentials:false
20+
21+
-name:Configure Git
22+
run:|
23+
git config user.name github-actions
24+
git config user.email github-actions@github.com
25+
26+
-name:Add Remote Repository
27+
run:|
28+
git remote add upstream https://github.com/nicklockwood/SwiftFormat.git
29+
git remote -v
30+
31+
-name:Fetch from Upstream
32+
run:|
33+
git fetch upstream
34+
35+
-name:Hard Reset to Upstream
36+
run:|
37+
git reset --hard upstream/develop
38+
39+
-name:Force Push Changes
40+
uses:ad-m/github-push-action@master
41+
with:
42+
github_token:${{ secrets.PAT }}
43+
branch:develop
44+
force:true
45+
46+
create-release:
47+
needs:sync-develop
48+
runs-on:ubuntu-latest
49+
steps:
50+
-name:Checkout
51+
uses:actions/checkout@v4
52+
with:
53+
ref:develop
54+
fetch-depth:0
55+
persist-credentials:false
56+
57+
-name:Configure Git
58+
run:|
59+
git config user.name github-actions
60+
git config user.email github-actions@github.com
61+
62+
-name:Generate Tag Name
63+
id:tag
64+
run:|
65+
echo "TAG_NAME=SwiftFormat-nightly-$(date +'%Y-%m-%d')" >> $GITHUB_ENV
66+
67+
-name:Create Tag
68+
run:|
69+
git tag ${{ env.TAG_NAME }}
70+
71+
-name:Push Tag
72+
uses:ad-m/github-push-action@master
73+
with:
74+
github_token:${{ secrets.PAT }}
75+
branch:refs/tags/${{ env.TAG_NAME }}
76+
force:true
77+
78+
-name:Create Release
79+
uses:softprops/action-gh-release@v1
80+
with:
81+
name:${{ env.TAG_NAME }}
82+
tag_name:${{ env.TAG_NAME }}
83+
body:|
84+
Nightly build of the SwiftFormat `develop` branch on $(date +'%B %-d, %Y').
85+
86+
Nightly builds are subject to breaking changes.
87+
88+
Source code is available at https://github.com/${{ github.repository }}/tree/${{ env.TAG_NAME }}
89+
draft:false
90+
prerelease:true
91+
make_latest:true
92+
env:
93+
GITHUB_TOKEN:${{ secrets.PAT }}

‎.github/workflows/sync.yml

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Nightly Release
22

33
on:
44
schedule:
5-
# Runs at midnight UTC (adjust as needed)
5+
# Runs at midnight UTC
66
-cron:'0 0 * * *'
77
# Allow manual triggering
88
workflow_dispatch:
@@ -41,4 +41,53 @@ jobs:
4141
with:
4242
github_token:${{ secrets.PAT }}
4343
branch:develop
44-
force:true
44+
force:true
45+
46+
create-release:
47+
needs:sync-develop
48+
runs-on:ubuntu-latest
49+
steps:
50+
-name:Checkout
51+
uses:actions/checkout@v4
52+
with:
53+
ref:develop
54+
fetch-depth:0
55+
persist-credentials:false
56+
57+
-name:Configure Git
58+
run:|
59+
git config user.name github-actions
60+
git config user.email github-actions@github.com
61+
62+
-name:Generate Tag Name
63+
id:tag
64+
run:|
65+
echo "TAG_NAME=SwiftFormat-nightly-$(date +'%Y-%m-%d')" >> $GITHUB_ENV
66+
67+
-name:Create Tag
68+
run:|
69+
git tag ${{ env.TAG_NAME }}
70+
71+
-name:Push Tag
72+
uses:ad-m/github-push-action@master
73+
with:
74+
github_token:${{ secrets.PAT }}
75+
branch:refs/tags/${{ env.TAG_NAME }}
76+
force:true
77+
78+
-name:Create Release
79+
uses:softprops/action-gh-release@v1
80+
with:
81+
name:${{ env.TAG_NAME }}
82+
tag_name:${{ env.TAG_NAME }}
83+
body:|
84+
Nightly build of the SwiftFormat `develop` branch on $(date +'%B %-d, %Y').
85+
86+
Nightly builds are subject to breaking changes.
87+
88+
Source code is available at https://github.com/${{ github.repository }}/tree/${{ env.TAG_NAME }}
89+
draft:false
90+
prerelease:true
91+
make_latest:true
92+
env:
93+
GITHUB_TOKEN:${{ secrets.PAT }}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp