Compare commits
57 Commits
v4.5.6
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c49c48572f | ||
|
|
f7c5b3e956 | ||
|
|
4dc95bf252 | ||
|
|
dc7dd1e768 | ||
|
|
8add493c77 | ||
|
|
30bcef5c7f | ||
|
|
f9a41a087c | ||
|
|
35131167a6 | ||
|
|
d215b853f8 | ||
|
|
84a970f8a4 | ||
|
|
31cbe74bb2 | ||
|
|
108af45b25 | ||
|
|
100a1b61f4 | ||
|
|
d44e0c8512 | ||
|
|
8f36bf3ee6 | ||
|
|
890c988757 | ||
|
|
bedc122eda | ||
|
|
e87cd570d2 | ||
|
|
888cfb7f0c | ||
|
|
febd814501 | ||
|
|
91716319e5 | ||
|
|
95a34adfba | ||
|
|
0865ac62e2 | ||
|
|
fa26cc9ba1 | ||
|
|
06622d8529 | ||
|
|
6e884a3321 | ||
|
|
26f94b13a3 | ||
|
|
543d33a363 | ||
|
|
08c6b3a2e3 | ||
|
|
fe62eb455c | ||
|
|
139af4526d | ||
|
|
fdc6d95388 | ||
|
|
55e21143a9 | ||
|
|
4e2e9638b6 | ||
|
|
6a103e03a3 | ||
|
|
a2e2213ce4 | ||
|
|
4bc423721a | ||
|
|
5ef1917f61 | ||
|
|
3b98325435 | ||
|
|
7688e0cbc7 | ||
|
|
5595250e09 | ||
|
|
4e8f7f271f | ||
|
|
f2db146379 | ||
|
|
11e6e12f60 | ||
|
|
56827f467a | ||
|
|
34a05d36a6 | ||
|
|
bb1ee93cb9 | ||
|
|
de64657f2c | ||
|
|
32e0aac7fa | ||
|
|
d62945518b | ||
|
|
a73381dafa | ||
|
|
3c564909d0 | ||
|
|
e65ddbcdfd | ||
|
|
71f3728648 | ||
|
|
54b0888107 | ||
|
|
0a056599a3 | ||
|
|
18c361ce7f |
40
.github/workflows/hz.js
vendored
Normal file
40
.github/workflows/hz.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
// see https://github.com/actions/github-script
|
||||||
|
// , core, glob, io, exec, require
|
||||||
|
module.exports = function (github, context) {
|
||||||
|
|
||||||
|
var module = {}
|
||||||
|
|
||||||
|
// this is *not* exported
|
||||||
|
function noop ( ) { }
|
||||||
|
|
||||||
|
// this *is* exported
|
||||||
|
module.getReleaseByTag = async function (tag_name) {
|
||||||
|
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_name) {
|
||||||
|
rel = r
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return rel
|
||||||
|
}
|
||||||
|
|
||||||
|
module.getRefReleaseTag = function (ref) {
|
||||||
|
// test, must start with 'refs/heads/release/' 19 chars
|
||||||
|
return "v" + ref.substring(19)
|
||||||
|
}
|
||||||
|
|
||||||
|
return module;
|
||||||
|
}
|
||||||
101
.github/workflows/publish-release.yml
vendored
Normal file
101
.github/workflows/publish-release.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
name: Publish
|
||||||
|
|
||||||
|
#meh
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
confirm:
|
||||||
|
description: "This is really going to release. Enter \'yolo\' to confirm that you really want to do it."
|
||||||
|
required: true
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/heads/release/')
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Confirm
|
||||||
|
uses: actions/github-script@v4
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
if ("${{ github.event.inputs.confirm }}" != "yolo") {
|
||||||
|
core.setFailed(`Not confirmed (confirm = '${{ github.event.inputs.confirm }}').`)
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- 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 hz = require("./.github/workflows/hz.js")(github, context)
|
||||||
|
const ref = "${{ github.ref }}"
|
||||||
|
const tag = hz.getRefReleaseTag(ref)
|
||||||
|
if (tag === null) {
|
||||||
|
core.setFailed(`Invalid reference ${ref} is not release/<version>.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var rel = await hz.getReleaseByTag(tag)
|
||||||
|
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: 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 hz = require("./.github/workflows/hz.js")(github, context)
|
||||||
|
const ref = "${{ github.ref }}"
|
||||||
|
const tag = hz.getRefReleaseTag(ref)
|
||||||
|
if (tag === null) {
|
||||||
|
core.setFailed(`Invalid reference ${ref} is not release/<version>.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var rel = await hz.getReleaseByTag(tag)
|
||||||
|
await github.repos.updateRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
release_id: rel.id,
|
||||||
|
draft: false
|
||||||
|
})
|
||||||
26
.github/workflows/rest-description.yml
vendored
Normal file
26
.github/workflows/rest-description.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Toy with issue description
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
toy-desc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
!contains(github.event.issue.title, '!exclude!') ||
|
||||||
|
contains(github.event.issue.title, '!force!')
|
||||||
|
steps:
|
||||||
|
- name: Toy with issue description
|
||||||
|
uses: actions/github-script@v4.0.2
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const title = `${{ github.event.issue.title }} !`
|
||||||
|
const body = `updated\n${{ github.event.issue.body }}`
|
||||||
|
github.issues.update({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
title: title,
|
||||||
|
body: body
|
||||||
|
})
|
||||||
|
|
||||||
Reference in New Issue
Block a user