-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from THEOplayer/release/1.9.0
Release 1.9.0
- Loading branch information
Showing
20 changed files
with
422 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Create release PR | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'New version' | ||
required: true | ||
type: string | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- name: Create app token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.THEOPLAYER_BOT_APP_ID }} | ||
private-key: ${{ secrets.THEOPLAYER_BOT_PRIVATE_KEY }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
- name: Configure Git user | ||
run: | | ||
git config user.name 'theoplayer-bot[bot]' | ||
git config user.email '873105+theoplayer-bot[bot]@users.noreply.github.com' | ||
- name: Bump version | ||
shell: bash | ||
run: | | ||
node ./scripts/set_version.js ${{ inputs.version }} | ||
- name: Push to release branch | ||
shell: bash | ||
run: | | ||
git commit -a -m ${{ inputs.version }} | ||
git push origin "HEAD:release/${{ inputs.version }}" | ||
- name: Create pull request | ||
shell: bash | ||
run: | | ||
gh pr create \ | ||
--base main \ | ||
--head "release/${{ inputs.version }}" \ | ||
--title "Release ${{ inputs.version }}" \ | ||
--body "$(node ./scripts/github_changelog.js ${{ inputs.version }})" | ||
env: | ||
GH_TOKEN: ${{ steps.app-token.outputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Sync develop with main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create app token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.THEOPLAYER_BOT_APP_ID }} | ||
private-key: ${{ secrets.THEOPLAYER_BOT_PRIVATE_KEY }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
ref: develop | ||
fetch-depth: 50 | ||
- name: Configure Git user | ||
run: | | ||
git config user.name 'theoplayer-bot[bot]' | ||
git config user.email '873105+theoplayer-bot[bot]@users.noreply.github.com' | ||
- name: Sync develop with main | ||
run: | | ||
git fetch --no-tags --prune --no-recurse-submodules --depth=50 origin +refs/heads/main:refs/remotes/origin/main | ||
git merge --ff origin/main | ||
git push origin HEAD:develop |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Nov 20 16:01:06 CET 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env node | ||
const fs = require("node:fs"); | ||
const path = require("node:path"); | ||
const version = process.argv[2]; | ||
if (!version) { | ||
console.error("Missing required argument: version"); | ||
process.exit(1); | ||
} | ||
|
||
// Find block with current version | ||
const changelogPath = path.resolve(__dirname, "../CHANGELOG.md"); | ||
const changelog = fs.readFileSync(changelogPath, "utf-8"); | ||
const headingStart = "## "; | ||
// Find block with current version | ||
const block = changelog | ||
.split(headingStart) | ||
.find((block) => block.startsWith(`v${version}`)) | ||
.trim(); | ||
let lines = block.split("\n"); | ||
// Remove version | ||
lines.splice(0, 1); | ||
|
||
console.log(lines.join("\n").trim()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env node | ||
const fs = require("node:fs"); | ||
const path = require("node:path"); | ||
const version = process.argv[2]; | ||
if (!version) { | ||
console.error("Missing required argument: version"); | ||
process.exit(1); | ||
} | ||
|
||
// Update "version=1.2.3" in gradle.properties | ||
const gradlePropertiesPath = path.resolve(__dirname, "../gradle.properties"); | ||
let gradleProperties = fs.readFileSync(gradlePropertiesPath, "utf8"); | ||
gradleProperties = gradleProperties.replace( | ||
/^version=.+$/m, | ||
`version=${version}` | ||
); | ||
fs.writeFileSync(gradlePropertiesPath, gradleProperties); | ||
|
||
// Update heading in CHANGELOG.md | ||
const changelogPath = path.resolve(__dirname, "../CHANGELOG.md"); | ||
let changelog = fs.readFileSync(changelogPath, "utf8"); | ||
const now = new Date(); | ||
const today = `${now.getFullYear()}-${(now.getMonth() + 1) | ||
.toString() | ||
.padStart(2, "0")}-${now.getDate().toString().padStart(2, "0")}`; | ||
changelog = changelog.replace( | ||
/^## Unreleased$/m, | ||
`## v${version} (${today})` | ||
); | ||
fs.writeFileSync(changelogPath, changelog); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.