31 Commits
v ... v7.7.10

Author SHA1 Message Date
GitHub Actions
23478a09ad Foo 2021-12-12 18:00:05 +00:00
Stephan
888cfb7f0c wtf 2021-12-12 18:59:37 +01:00
Stephan
febd814501 wtf 2021-12-10 20:14:59 +01:00
Stephan
91716319e5 wtf 2021-12-10 20:10:08 +01:00
Stephan
95a34adfba wtf 2021-12-10 19:52:22 +01:00
Stephan
0865ac62e2 wtf 2021-12-10 19:47:20 +01:00
Stephan
fa26cc9ba1 wtf 2021-12-10 19:45:07 +01:00
Stephan
06622d8529 wtf 2021-12-10 19:36:59 +01:00
Stephan
6e884a3321 wtf 2021-12-10 19:34:47 +01:00
Stephan
26f94b13a3 wtf 2021-12-10 19:32:14 +01:00
Stephan
543d33a363 wtf 2021-12-10 19:04:10 +01:00
Stephan
08c6b3a2e3 wtf 2021-12-10 18:38:01 +01:00
Stephan
fe62eb455c wtf 2021-12-10 18:36:27 +01:00
Stephan
139af4526d wtf 2021-12-10 18:31:32 +01:00
Stephan
fdc6d95388 wtf 2021-12-10 18:29:29 +01:00
Stephan
55e21143a9 wtf 2021-12-10 18:22:59 +01:00
Stephan
4e2e9638b6 wtf 2021-12-10 18:17:13 +01:00
Stephan
6a103e03a3 wtf 2021-12-10 18:13:01 +01:00
Stephan
a2e2213ce4 pii 2021-12-10 18:10:02 +01:00
Stephan
4bc423721a exp 2021-12-10 18:09:50 +01:00
Stephan
5ef1917f61 exp 2021-12-10 18:04:43 +01:00
Stephan
3b98325435 exp 2021-12-10 17:53:40 +01:00
Stephan
7688e0cbc7 exp 2021-12-10 17:48:01 +01:00
Stephan
5595250e09 exp 2021-12-10 17:42:04 +01:00
Stephan
4e8f7f271f exp 2021-12-10 17:39:59 +01:00
Stephan
f2db146379 exp 2021-12-10 17:35:15 +01:00
Stephan
11e6e12f60 exp 2021-12-10 17:32:45 +01:00
Stephan
56827f467a rename 2021-12-10 17:30:51 +01:00
Stephan
34a05d36a6 exp 2021-12-10 17:29:04 +01:00
Stephan
bb1ee93cb9 exp 2021-12-10 17:27:14 +01:00
Stephan
de64657f2c exp 2021-12-10 16:40:40 +01:00
4 changed files with 106 additions and 19 deletions

View File

@@ -1,19 +0,0 @@
name: Manually Do Something
on: workflow_dispatch
jobs:
job:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/release/')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Do Something
run: |
version="${${{ github.ref }}:19}" # trim starting 'refs/heads/release/' (19 chars)
echo "Tag ref ${{ github.ref }} as v$version"
git tag v$version
git config user.email "github-actions@zpqrtbnk.net"
git config user.name "GitHub Actions (Do Something)"
git push --tags

104
.github/workflows/publish-release.yml vendored Normal file
View File

@@ -0,0 +1,104 @@
name: Publish Release
on: workflow_dispatch
jobs:
job:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/release/')
steps:
- name: Validate the release
uses: actions/github-script@v4
with:
# token needed to see draft releases when getting all releases
github-token: ${{ secrets.MY_GITHUB_TOKEN_TESTREPO }}
script: |
const ver = "${{ github.ref }}".substring(19)
const tag = "v" + ver
var rel = null
try {
// this does *not* return draft releases, so we have to list them
//rel = await github.repos.getReleaseByTag({ ... })
const rels = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo
})
for (const r of rels.data) {
if (r.tag_name === tag) {
rel = r
break
}
}
}
catch (error) {
core.setFailed(`Could not find a release for tag ${tag}.`)
return
}
if (rel === null) {
core.setFailed(`Could not find a release for tag ${tag}.`)
return
}
if (!rel.draft) {
core.setFailed(`Release for tag ${tag} is already published.`)
return
}
try {
const ref = await github.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/' + tag
})
core.setFailed(`Tag ${tag} already exists.`)
return
}
catch (error) {
// this is expected
}
// everything is OK
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure repository
shell: bash
run: |
git config user.email "github-actions@hazelcast.com"
git config user.name "GitHub Actions (Build Release)"
- name: Finalize the release
run: |
ref="${{ github.ref }}"
branch="${ref:11}" # trim starting 'refs/heads/' (11 chars)
version="${ref:19}" # trim starting 'refs/heads/release/' (19 chars)
echo "Tag branch $branch as v$version"
git tag v$version
git push --tags
#git push :$branch
- name: Publish the release
uses: actions/github-script@v4
with:
script: |
const ver = "${{ github.ref }}".substring(19)
const tag = "v" + ver
var rel = null
// no, see above
//const rel = await github.repos.getReleaseByTag({ ... })
const rels = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo
})
for (const r of rels.data) {
if (r.tag_name === tag) {
rel = r
break
}
}
await github.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: rel.id,
draft: false
})

View File

@@ -1 +1,2 @@
foo
foo

1
pii.txt Normal file
View File

@@ -0,0 +1 @@
pii