release 2.7.3 #21
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 workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
# Workflow syntax for GitHub Actions | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# Context and expression syntax for GitHub Actions | |
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions | |
name: Publish Prod-release Version | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
prod-release: | |
if: ${{ github.event.pull_request.merged == true }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [16.14] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# to trigger next gh action | |
# https://github.saobby.my.eu.orgmunity/t/push-from-action-even-with-pat-does-not-trigger-action/17622/6 | |
persist-credentials: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'yarn' | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Install clojure tools | |
uses: DeLaGuardo/setup-clojure@7.0 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cli: latest | |
bb: latest | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v3 | |
id: yarn-and-maven-cache # use this to check for `cache-hit` (`steps.yarn-and-maven-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: | | |
~/.m2/repository | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
./.shadow-cljs | |
key: ${{ runner.os }}-yarn-and-maven-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('./shadow-cljs.edn') }}-${{ hashFiles('./deps.edn') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-and-maven- | |
- run: yarn install --immutable | |
- name: Set package version | |
id: get-package-version | |
run: | | |
echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> "$GITHUB_OUTPUT" | |
- name: Print package version | |
run: echo "PACKAGE_VERSION=${{ steps.get-package-version.outputs.PACKAGE_VERSION }}" | |
- name: Get PR Release | |
uses: actions/github-script@v6 | |
id: get-release-version-and-tag | |
env: | |
NEXT_VERSION: ${{ steps.get-package-version.outputs.PACKAGE_VERSION }} | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
return await require('.github/scripts/getPreReleaseNumber.js')({github, context, core}); | |
- uses: release-drafter/release-drafter@v5 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
filter-by-commitish: true | |
commitish: ${{ github.base_ref }} | |
config-name: release-drafter-prod.yml | |
name: Release ${{ fromJSON(steps.get-release-version-and-tag.outputs.result).prod_tag }} | |
version: ${{ fromJSON(steps.get-release-version-and-tag.outputs.result).prod_version }} | |
tag: ${{ fromJSON(steps.get-release-version-and-tag.outputs.result).prod_tag }} | |
publish: true | |
prerelease: false | |
- name: build and release | |
env: | |
SNOWPACK_PUBLIC_SENTRY_DSN: ${{ secrets.SNOWPACK_PUBLIC_SENTRY_DSN }} | |
SNOWPACK_PUBLIC_FLUENT_ENV: 'production' | |
SNOWPACK_PUBLIC_FLUENT_VERSION: ${{ steps.get-package-version.outputs.PACKAGE_VERSION }} | |
run: yarn build | |
- name: zip files | |
run: | | |
cd ./dist | |
zip -r ./chrome.zip ./chrome | |
zip -r ./firefox.zip ./firefox | |
zip -r ./edge.zip ./edge | |
- uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/*.zip | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4.0.4 | |
with: | |
token: ${{ secrets.CONFLUX_BOT_GH_TOKEN }} | |
branch: 'create-pull-request/__main->dev__' | |
delete-branch: true | |
base: 'dev' | |
title: 'chore: merge main back to dev' |