diff options
author | 2021-07-06 19:00:11 +0530 | |
---|---|---|
committer | 2021-07-06 19:00:11 +0530 | |
commit | 4d489281242c68e3dbfae97db2d9a835fb1e5ce0 (patch) | |
tree | 83168ae889af9d6c742a966e0dcb780cf6cfbdd1 /.github/workflows | |
parent | Added new help text for lay-users to figure out what their user-agent value is. (diff) | |
download | ferdium-app-4d489281242c68e3dbfae97db2d9a835fb1e5ce0.tar.gz ferdium-app-4d489281242c68e3dbfae97db2d9a835fb1e5ce0.tar.zst ferdium-app-4d489281242c68e3dbfae97db2d9a835fb1e5ce0.zip |
Separated version number bump into the 'develop' branch from 'nightly' branch (#1610)
* Separated version number bump into the 'develop' branch so that the commit SHA appearing in 'About' will remain unchanged
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/dependency-updates.yml | 32 | ||||
-rw-r--r-- | .github/workflows/ferdi-builds.yml | 17 |
2 files changed, 28 insertions, 21 deletions
diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index 450ddf8a1..38de90dbd 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml | |||
@@ -3,6 +3,12 @@ | |||
3 | name: Ferdi Dependency updates | 3 | name: Ferdi Dependency updates |
4 | 4 | ||
5 | on: | 5 | on: |
6 | # Manual trigger from the UI | ||
7 | workflow_dispatch: | ||
8 | inputs: | ||
9 | message: | ||
10 | description: 'Message for build' | ||
11 | required: true | ||
6 | schedule: | 12 | schedule: |
7 | - cron: '0 0 * * *' # every night at 12 am | 13 | - cron: '0 0 * * *' # every night at 12 am |
8 | 14 | ||
@@ -21,6 +27,9 @@ jobs: | |||
21 | with: | 27 | with: |
22 | submodules: recursive | 28 | submodules: recursive |
23 | fetch-depth: 0 | 29 | fetch-depth: 0 |
30 | - name: Extract Git branch name from the currently checked out branch (not from the branch where this run was kicked off) | ||
31 | run: echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | ||
32 | shell: bash | ||
24 | - name: Cache node modules | 33 | - name: Cache node modules |
25 | uses: actions/cache@v2 | 34 | uses: actions/cache@v2 |
26 | env: | 35 | env: |
@@ -42,23 +51,24 @@ jobs: | |||
42 | npm i -g node-gyp@8.0.0 && npm config set node_gyp "$(which node-gyp)" | 51 | npm i -g node-gyp@8.0.0 && npm config set node_gyp "$(which node-gyp)" |
43 | - name: Install node dependencies recursively | 52 | - name: Install node dependencies recursively |
44 | run: npx lerna bootstrap | 53 | run: npx lerna bootstrap |
45 | - name: Update submodules, dependencies and run tests | 54 | - name: Update submodules |
55 | run: git submodule update --remote -f | ||
56 | - name: Update browserslist db | ||
57 | run: npx browserslist@latest --update-db | ||
58 | - name: Run linter, reformatter, rebrander and tests | ||
46 | run: | | 59 | run: | |
47 | echo "Updating submodules" | ||
48 | git submodule update --remote -f | ||
49 | |||
50 | echo "Updating browserslist db" | ||
51 | npx browserslist@latest --update-db | ||
52 | |||
53 | echo "Running linter, reformatter, rebrander and tests" | ||
54 | npm run lint | 60 | npm run lint |
55 | npm run reformat-files | 61 | npm run reformat-files |
56 | npm run manage-translations | 62 | npm run manage-translations |
57 | npm run apply-branding | 63 | npm run apply-branding |
58 | npm run test | 64 | npm run test |
59 | 65 | - name: Commit submodules, dependency-updates and linter changes | |
60 | echo "Committing and pushing submodules, dependency-updates and linter changes" | 66 | run: | |
61 | git config user.name github-actions | 67 | git config user.name github-actions |
62 | git config user.email github-actions@github.com | 68 | git config user.email github-actions@github.com |
63 | git commit -am "Update submodules, browserslist data updates and linter fixes [skip ci]" --no-verify || true | 69 | git commit -am "Update submodules, browserslist data updates and linter fixes [skip ci]" --no-verify || true |
64 | git push origin $(git rev-parse --abbrev-ref HEAD) --no-verify | 70 | - name: Bump version number if this is a scheduled build or has been manually triggered with 'version bump' in the text, then bump the version number |
71 | if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, 'version bump')) }} | ||
72 | run: npm version prerelease --preid=nightly | ||
73 | - name: Push all changes | ||
74 | run: git push origin ${{ env.GIT_BRANCH_NAME }} --no-verify | ||
diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml index c2c253011..78c47f74e 100644 --- a/.github/workflows/ferdi-builds.yml +++ b/.github/workflows/ferdi-builds.yml | |||
@@ -5,8 +5,10 @@ | |||
5 | # 'FERDI_PUBLISH_TOKEN' (A GitHub Personal Access Token with appropriate permissions - for publishing the built artifacts) | 5 | # 'FERDI_PUBLISH_TOKEN' (A GitHub Personal Access Token with appropriate permissions - for publishing the built artifacts) |
6 | # 'APPLEID' (The username of your Apple developer account - for notarizing the mac artifacts) | 6 | # 'APPLEID' (The username of your Apple developer account - for notarizing the mac artifacts) |
7 | # 'APPLEID_PASSWORD' (An app-specific password - for notarizing the mac artifacts) | 7 | # 'APPLEID_PASSWORD' (An app-specific password - for notarizing the mac artifacts) |
8 | # 'CSC_LINK' (The HTTPS link or local path to certificate - for code signing of mac and windows artifacts) | 8 | # 'CSC_LINK' (The HTTPS link or local path to certificate - for code signing of mac artifacts) |
9 | # 'CSC_KEY_PASSWORD' (The password to decrypt the certificate given in CSC_LINK - for code signing of mac and windows artifacts) | 9 | # 'CSC_KEY_PASSWORD' (The password to decrypt the certificate given in CSC_LINK - for code signing of mac artifacts) |
10 | # 'WIN_CSC_LINK' (The HTTPS link or local path to certificate - for code signing of windows artifacts) | ||
11 | # 'WIN_CSC_KEY_PASSWORD' (The password to decrypt the certificate given in CSC_LINK - for code signing of windows artifacts) | ||
10 | 12 | ||
11 | name: Ferdi Builds | 13 | name: Ferdi Builds |
12 | 14 | ||
@@ -51,8 +53,8 @@ jobs: | |||
51 | git config user.name github-actions | 53 | git config user.name github-actions |
52 | git config user.email github-actions@github.com | 54 | git config user.email github-actions@github.com |
53 | 55 | ||
54 | echo "Merge from 'origin/develop'" | 56 | echo "Merge with fast-forward from 'origin/develop'" |
55 | git merge --no-ff --no-verify --commit -m "Merge remote-tracking branch 'origin/develop' into HEAD" origin/develop | 57 | git merge --ff-only origin/develop --no-verify |
56 | 58 | ||
57 | CHANGES_COUNT=$(git diff --shortstat origin/nightly | wc -l) | 59 | CHANGES_COUNT=$(git diff --shortstat origin/nightly | wc -l) |
58 | MANUAL_REBUILD="${{ github.event_name == 'workflow_dispatch' }}" | 60 | MANUAL_REBUILD="${{ github.event_name == 'workflow_dispatch' }}" |
@@ -61,12 +63,7 @@ jobs: | |||
61 | echo "No changes found - terminating the build" | 63 | echo "No changes found - terminating the build" |
62 | echo "::set-output name=should_run::false" | 64 | echo "::set-output name=should_run::false" |
63 | else # changes > 0 (or) MANUAL_REBUILD=true | 65 | else # changes > 0 (or) MANUAL_REBUILD=true |
64 | if [ $MANUAL_REBUILD != "true" ] || [ "${{ contains(github.event.inputs.message, 'version bump') }}" == "true" ]; then | 66 | echo "Pushing rebased commits" |
65 | echo "Bumping version number" | ||
66 | npm version prerelease --preid=nightly | ||
67 | fi | ||
68 | |||
69 | echo "Pushing merge and version-bump commits" | ||
70 | git push origin $(git rev-parse --abbrev-ref HEAD) --no-verify | 67 | git push origin $(git rev-parse --abbrev-ref HEAD) --no-verify |
71 | fi | 68 | fi |
72 | 69 | ||