Merge pull request #113 from ouchadam/release-candidate
[Auto] Release Candidate
This commit is contained in:
commit
94fa3cdd9a
|
@ -26,6 +26,7 @@ jobs:
|
|||
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.MY_PAT }}
|
||||
script: |
|
||||
const { startReleaseProcess } = await import('${{ github.workspace }}/tools/beta-release/app.js')
|
||||
await startReleaseProcess({github, context, core})
|
||||
|
|
|
@ -42,6 +42,7 @@ jobs:
|
|||
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.MY_PAT }}
|
||||
script: |
|
||||
const { publishRelease } = await import('${{ github.workspace }}/tools/beta-release/app.js')
|
||||
const artifacts = {
|
||||
|
|
|
@ -135,11 +135,22 @@ const createBranch = async (github, branchName, fromBranch) => {
|
|||
|
||||
const incrementVersionFile = async (github, branchName) => {
|
||||
const versionFile = await readVersionFile(github, branchName)
|
||||
const [date, rc] = versionFile.content.name.split("-V")
|
||||
const today = new Date().toLocaleDateString("en-GB")
|
||||
|
||||
let updatedVersionName = undefined
|
||||
if (today == date) {
|
||||
updatedVersionName = `${date}-V${rc + 1}`
|
||||
} else {
|
||||
updatedVersionName = `${today}-V1`
|
||||
}
|
||||
|
||||
const updatedVersionFile = {
|
||||
...versionFile.content,
|
||||
code: versionFile.content.code + 1,
|
||||
name: updatedVersionName,
|
||||
}
|
||||
|
||||
|
||||
const encodedContentUpdate = Buffer.from(JSON.stringify(updatedVersionFile, null, 2)).toString('base64')
|
||||
await github.rest.repos.createOrUpdateFileContents({
|
||||
owner: config.owner,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "0.0.1-alpha04",
|
||||
"code": 8
|
||||
"code": 9,
|
||||
"name": "03/09/2022-V1"
|
||||
}
|
Loading…
Reference in New Issue