-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into add-thumbnail-API
- Loading branch information
Showing
9 changed files
with
223 additions
and
52 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
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,15 +1,89 @@ | ||
name: Finish Release Train | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
env: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
concurrency: | ||
group: finish-release-train-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
jobs: | ||
placeholder: | ||
create_pr: | ||
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v') | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version_number: ${{ steps.version_number.outputs.version_number }} | ||
steps: | ||
- name: Placeholder | ||
run: echo "Placeholder" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Detect version number | ||
id: version_number | ||
run: | | ||
version_number="$(npm view bitmovin-player-react-native version)" | ||
echo "Detected version number: $version_number" | ||
echo "version_number=$version_number" >> $GITHUB_OUTPUT | ||
- name: Create PR | ||
run: | | ||
gh pr create \ | ||
--base "development" \ | ||
--head "main" \ | ||
--title "Finish release ${{ steps.version_number.outputs.version_number }}" \ | ||
--body "Finish release ${{ steps.version_number.outputs.version_number }}" | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
publish_release: | ||
needs: [create_pr] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Git User | ||
run: | | ||
# setup git | ||
git config --global user.name "Bitmovin Release Automation" | ||
git config --global user.email "[email protected]" | ||
- name: Add tag | ||
run: | | ||
git tag v${{ needs.create_pr.outputs.version_number }} | ||
- name: Git push | ||
run: | | ||
git push origin v${{ needs.create_pr.outputs.version_number }} | ||
- name: Setup node and npm registry | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build TypeScript files | ||
run: yarn build | ||
|
||
- name: Publish npm package | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Extract changelog | ||
id: changelog | ||
uses: ffurrer2/extract-release-notes@v1 | ||
|
||
- name: Create GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: ${{ steps.changelog.outputs.release_notes }} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,66 @@ on: | |
env: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
concurrency: | ||
group: start-release-train-${{ inputs.version_number }} | ||
cancel-in-progress: true | ||
jobs: | ||
placeholder: | ||
name: Placeholder job | ||
runs-on: ubuntu-latest | ||
create_release_pr: | ||
name: Create release branch and bump version | ||
runs-on: macos-latest | ||
outputs: | ||
branch_name: ${{ steps.branching.outputs.branch_name }} | ||
steps: | ||
- name: Placeholder step | ||
run: echo "Placeholder step" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Git User | ||
run: | | ||
# setup git | ||
git config --global user.name "Bitmovin Release Automation" | ||
git config --global user.email "[email protected]" | ||
- name: Setup node and npm registry | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'yarn' | ||
|
||
- name: Set Release Branch name | ||
id: branching | ||
run: | | ||
branch_name="release/v${{ inputs.version_number }}" | ||
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT | ||
- name: Create Release Branch | ||
run: | | ||
# Delete the release branch if already exists, useful in case we need to re-run this workflow | ||
git push origin --delete ${{ steps.branching.outputs.branch_name }} || true | ||
git checkout -b ${{ steps.branching.outputs.branch_name }} | ||
- name: Bump changelog version | ||
run: | | ||
sed -i'.bak' "s/\[Unreleased\]/\[${{ inputs.version_number }}\] \(${{ inputs.release_date }}\)/g" CHANGELOG.md | ||
- name: Bump package.json version | ||
run: | | ||
npm version ${{ inputs.version_number }} --no-git-tag-version | ||
- name: Update Podfile.lock | ||
run: | | ||
yarn bootstrap | ||
- name: Commit changelog version bump | ||
run: | | ||
git add CHANGELOG.md package.json example/ios/Podfile.lock | ||
git commit -m "chore: prepare release ${{ inputs.version_number }}" | ||
git push origin ${{ steps.branching.outputs.branch_name }} | ||
- name: Create PR | ||
run: | | ||
gh pr create \ | ||
--base "main" \ | ||
--title "Release ${{ inputs.version_number }}" \ | ||
--body "Release ${{ inputs.version_number }}" | ||
env: | ||
GH_TOKEN: ${{ github.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
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