-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: changelog file name should be unique
- Loading branch information
Showing
3 changed files
with
110 additions
and
24 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 |
---|---|---|
|
@@ -97,7 +97,7 @@ jobs: | |
- name: 'Set date variable' | ||
id: date | ||
run: echo "::set-output name=date::$(date +%s%N)" | ||
run: echo "date::$(date +%s%N)" >> $GITHUB_OUTPUT | ||
|
||
- name: 'Upload changelog' | ||
id: upload-file | ||
|
@@ -199,18 +199,14 @@ jobs: | |
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: post-build-env | ||
name: post-build-env-${{ inputs.fastlane_action }} | ||
path: | | ||
**/.post_build/*.env | ||
- name: Load .env file | ||
if: always() | ||
uses: xom9ikk/[email protected] | ||
with: | ||
path: fastlane/.post_build | ||
- uses: akiojin/[email protected] | ||
id: base64-decoded-RELEASE_NOTES | ||
with: | ||
base64: ${{ env.RELEASE_NOTES }} | ||
- uses: akiojin/[email protected] | ||
id: base64-decoded-S3_PATHS | ||
with: | ||
|
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,25 +1,37 @@ | ||
name: C1 C2 C3 Restricted | ||
|
||
on: workflow_dispatch | ||
|
||
permissions: | ||
checks: write | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
column: | ||
description: 'Select the column to release (C1, C2, C3, all)' | ||
type: choice | ||
options: | ||
- C1 | ||
- C2 | ||
- C3 | ||
- all | ||
required: true | ||
default: 'all' | ||
|
||
jobs: | ||
column_1_restricted: | ||
uses: ./.github/workflows/_reusable_app_release.yml | ||
with: | ||
fastlane_action: appstore_col_1_restricted | ||
secrets: inherit | ||
|
||
column_2_restricted: | ||
uses: ./.github/workflows/_reusable_app_release.yml | ||
changelog: | ||
uses: ./.github/workflows/changelog.yml | ||
with: | ||
fastlane_action: appstore_col_2_restricted | ||
secrets: inherit | ||
|
||
column_3_restricted: | ||
cloud: false | ||
release: | ||
needs: changelog | ||
strategy: | ||
matrix: | ||
app_config: | ||
- column: C1 | ||
fastlane_action: "appstore_col_1_restricted" | ||
- column: C2 | ||
fastlane_action: "appstore_col_2_restricted" | ||
- column: C3 | ||
fastlane_action: "appstore_col_3_restricted" | ||
if: contains(inputs.column, matrix.app_config.column) || inputs.column == 'all' | ||
uses: ./.github/workflows/_reusable_app_release.yml | ||
with: | ||
fastlane_action: appstore_col_3_restricted | ||
secrets: inherit | ||
fastlane_action: ${{ matrix.app_config.fastlane_action }} | ||
changelog-url: ${{ needs.changelog.outputs.changelog-url }} |
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,78 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
cloud: | ||
required: true | ||
type: boolean | ||
default: true | ||
|
||
env: # https://docs.fastlane.tools/getting-started/ios/setup/ | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
|
||
permissions: | ||
checks: write | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changelog-url: ${{ steps.expose-url.outputs.changelog }} | ||
steps: | ||
- name: 'Checkout Git repository with history for all branches and tags' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Tag regex' | ||
id: regex | ||
run: | | ||
if ${{ inputs.cloud }}; then | ||
echo "regex='appstore/[0-9]+\.[0-9]+\.[0-9]*'" >> $GITHUB_ENV | ||
else | ||
echo "regex='bk_build/[0-9]+\.[0-9]+\.[0-9]*'" >> $GITHUB_ENV | ||
fi | ||
- name: 'Calculate diff between HEAD and latest tag' | ||
run: echo "HEAD_TAG_DIFF=$(git diff HEAD $(git tag | grep -E '${{ env.regex }}' | tail -n 1) | wc -l | xargs)" >> "$GITHUB_ENV" | ||
|
||
- name: 'Set current Git tag to HEAD' | ||
if: "${{ env.HEAD_TAG_DIFF != '0' }}" | ||
run: echo "CURRENT_TAG=$(git rev-parse HEAD)" >> "$GITHUB_ENV" | ||
- name: 'Set previous Git tag to latest tag if comparing to head' | ||
if: "${{ env.HEAD_TAG_DIFF != '0' }}" | ||
run: echo "PREVIOUS_TAG=$(git tag | grep -E '${{ env.regex }}' | tail -n 1)" >> "$GITHUB_ENV" | ||
|
||
- name: 'Set current Git tag to latest tagged commit' | ||
if: "${{ env.HEAD_TAG_DIFF == '0' }}" | ||
run: echo "CURRENT_TAG=$(git tag | grep -E '${{ env.regex }}' | tail -n 1)" >> "$GITHUB_ENV" | ||
- name: 'Set previous Git tag previous tag because head is latest tag' | ||
if: "${{ env.HEAD_TAG_DIFF == '0' }}" | ||
run: echo "PREVIOUS_TAG=$(git tag | grep -E '${{ env.regex }}' | tail -n 2 | head -n 1)" >> "$GITHUB_ENV" | ||
|
||
- name: 'Print environment variables' | ||
run: | | ||
echo -e "PREVIOUS_TAG = $PREVIOUS_TAG" | ||
echo -e "CURRENT_TAG = $CURRENT_TAG" | ||
echo -e "Node.js version = $(node --version)" | ||
- name: 'Generate changelog' | ||
run: | | ||
echo "{}" > ./package.json | ||
npx [email protected] -t "$PREVIOUS_TAG...$CURRENT_TAG" | ||
- name: 'Set date variable' | ||
id: date | ||
run: echo "date=$(date +%s%N)" >> $GITHUB_OUTPUT | ||
|
||
- name: 'Upload changelog' | ||
id: upload-file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CHANGELOG-${{ github.run_number }}-${{ steps.date.outputs.date }}.md | ||
path: ./CHANGELOG.md | ||
if-no-files-found: error | ||
overwrite: true | ||
|
||
- name: Expose url of changelog | ||
id: expose-url | ||
run: echo "changelog=${{ steps.upload-file.outputs.artifact-url }}" >> $GITHUB_OUTPUT | ||
|