initial run of the release

This commit is contained in:
Joseph Flinn 2021-02-02 13:27:15 -08:00
parent 92ea3f7820
commit bd26cdf41b
2 changed files with 93 additions and 59 deletions

View File

@ -37,8 +37,7 @@ jobs:
shell: pwsh shell: pwsh
run: | run: |
$repo_url = "https://github.com/${env:GITHUB_REPOSITORY}.git" $repo_url = "https://github.com/${env:GITHUB_REPOSITORY}.git"
$build_num = [int]$env:GITHUB_RUN_NUMBER $adj_build_num = "latest"
$adj_build_num = $build_num + 3000
echo "::set-output name=repo_url::$repo_url" echo "::set-output name=repo_url::$repo_url"
echo "::set-output name=adj_build_number::$adj_build_num" echo "::set-output name=adj_build_number::$adj_build_num"
@ -69,9 +68,6 @@ jobs:
node --version node --version
npm --version npm --version
#- name: Install Gulp
# run: npm install -g gulp
- name: npm setup & test - name: npm setup & test
run: | run: |
npm install npm install
@ -80,19 +76,6 @@ jobs:
- name: gulp - name: gulp
run: gulp ci run: gulp ci
- name: Build sources for reviewers
shell: cmd
run: |
mkdir dist\Source
call git clone --branch=%GITHUB_REF% %REPO_URL% dist\Source
cd dist\Source
call git checkout %GITHUB_SHA%
call git submodule update --init --recursive
cd ../
del /S/Q "Source\.git\objects\pack\*"
call 7z a browser-source-%BUILD_NUMBER%.zip "Source\*"
- name: test dist - name: test dist
run: ls dist run: ls dist
@ -120,13 +103,7 @@ jobs:
name: dist-edge-${{ env.BUILD_NUMBER }}.zip name: dist-edge-${{ env.BUILD_NUMBER }}.zip
path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip
- name: Upload source artifact - name: Upload coverage artifact
uses: actions/upload-artifact@v2
with:
name: dist-source-${{ env.BUILD_NUMBER }}.zip
path: dist/browser-source-${{ env.BUILD_NUMBER }}.zip
- name: Upload opera artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: coverage-${{ env.BUILD_NUMBER }}.zip name: coverage-${{ env.BUILD_NUMBER }}.zip

View File

@ -1,11 +1,11 @@
name: Release name: Build
on: on:
push:
branches-ignore:
- 'l10n_master'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
release_tag_name_input:
description: 'Release Tag Name <X.X.X>'
required: true
jobs: jobs:
@ -26,6 +26,8 @@ jobs:
setup: setup:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
tag_version: ${{ steps.create_tags.outputs.tag_version }}
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
repo_url: ${{ steps.gen_vars.outputs.repo_url }} repo_url: ${{ steps.gen_vars.outputs.repo_url }}
adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }}
steps: steps:
@ -34,12 +36,46 @@ jobs:
- name: Get Package Version - name: Get Package Version
id: gen_vars id: gen_vars
shell: pwsh
run: | run: |
repo_url="https://github.com/${{ env.GITHUB_REPOSITORY }}.git" $repo_url = "https://github.com/${env:GITHUB_REPOSITORY}.git"
build_num=$(${{ env.GITHUB_RUN_NUMBER }} + 3000) $build_num = [int]$env:GITHUB_RUN_NUMBER
$adj_build_num = $build_num + 3000
echo "::set-output name=repo_url::$repo_url" echo "::set-output name=repo_url::$repo_url"
echo "::set-output name=adj_build_number::$build_num" echo "::set-output name=adj_build_number::$adj_build_num"
- name: Create Release Vars
id: create_tags
run: |
case "${RELEASE_TAG_NAME_INPUT:0:1}" in
v)
echo "RELEASE_NAME=${RELEASE_TAG_NAME_INPUT:1}" >> $GITHUB_ENV
echo "RELEASE_TAG_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "::set-output name=tag_version::$RELEASE_TAG_NAME_INPUT"
;;
[0-9])
echo "RELEASE_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "RELEASE_TAG_NAME=v$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
echo "::set-output name=tag_version::v$RELEASE_TAG_NAME_INPUT"
;;
*)
exit 1
;;
esac
env:
RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }}
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG_NAME }}
release_name: ${{ env.RELEASE_NAME }}
draft: true
prerelease: false
cli: cli:
@ -67,9 +103,6 @@ jobs:
node --version node --version
npm --version npm --version
#- name: Install Gulp
# run: npm install -g gulp
- name: npm setup & test - name: npm setup & test
run: | run: |
npm install npm install
@ -94,38 +127,62 @@ jobs:
- name: test dist - name: test dist
run: ls dist run: ls dist
- name: Upload opera artifact - name: Upload opera release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: dist-opera-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: dist/dist-opera-${{ env.BUILD_NUMBER }}.zip asset_name: dist-opera-${{ env.BUILD_NUMBER }}.zip
asset_path: dist/dist-opera-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application
- name: Upload chrome artifact - name: upload chrome release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: dist-chrome-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: dist/dist-chrome-${{ env.BUILD_NUMBER }}.zip asset_name: dist-chrome-${{ env.BUILD_NUMBER }}.zip
asset_path: dist/dist-chrome-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application/zip
- name: Upload firefox artifact - name: upload firefox release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: dist-firefox-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: dist/dist-firefox-${{ env.BUILD_NUMBER }}.zip asset_name: dist-firefox-${{ env.BUILD_NUMBER }}.zip
asset_path: dist/dist-firefox-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application/zip
- name: Upload edge artifact - name: upload edge release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: dist-edge-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip asset_name: dist-edge-${{ env.BUILD_NUMBER }}.zip
asset_path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application/zip
- name: Upload source artifact - name: upload browser source zip release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: dist-source-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: dist/browser-source-${{ env.BUILD_NUMBER }}.zip asset_name: dist-source-${{ env.BUILD_NUMBER }}.zip
asset_path: dist/browser-source-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application/zip
- name: Upload opera artifact - name: upload coverage release asset
uses: actions/upload-artifact@v2 uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: coverage-${{ env.BUILD_NUMBER }}.zip upload_url: ${{ needs.setup.outputs.release_upload_url }}
path: coverage/coverage-${{ env.BUILD_NUMBER }}.zip asset_name: coverage-${{ env.BUILD_NUMBER }}.zip
asset_path: coverage/coverage-${{ env.BUILD_NUMBER }}.zip
asset_content_type: application/zip