-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use github ref and new variable outputs
- Loading branch information
1 parent
ff36ca3
commit f7e43bf
Showing
4 changed files
with
14 additions
and
31 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 |
---|---|---|
|
@@ -13,31 +13,18 @@ jobs: | |
brand: ["payex", "swedbankpay"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Set brand specific variables | ||
- name: Environment variables | ||
id: variables | ||
run: ./.github/scripts/variables.sh | ||
env: | ||
BRAND: ${{ matrix.brand }} | ||
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }} | ||
|
||
# Add sentry token | ||
- name: Sentry token | ||
run: ./.github/scripts/sentry.sh | ||
env: | ||
TOKEN: ${{ secrets.SENTRY_TOKEN }} | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.3.x' | ||
|
||
- name: Use GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/setup-node@master | ||
with: | ||
|
@@ -57,13 +44,13 @@ jobs: | |
run: npm run lint && npm run test:codecov | ||
|
||
- name: Build | ||
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env.release=true --env.baseUrl="${{ steps.variables.outputs.BRAND_URL }}" --env.basename="v/${{ steps.gitversion.outputs.majorMinorPatch }}" --env.semver=${{ steps.gitversion.outputs.semVer }} --env.info_version=${{ steps.gitversion.outputs.informationalVersion }} --env.github_actions=true | ||
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env.release=true --env.baseUrl="${{ steps.variables.outputs.BRAND_URL }}" --env.basename="v/${{ steps.variables.outputs.VERSION }}" --env.semver=${{ steps.variables.outputs.VERSION }} --env.github_actions=true | ||
|
||
- name: Zip Release | ||
id: zip | ||
env: | ||
BRAND: ${{ steps.variables.outputs.BRAND_NAME }} | ||
run: | | ||
run: | | ||
ZIPFILE=${BRAND}-DesignGuide.zip | ||
echo "Zipping ${ZIPFILE}" | ||
zip -r ${ZIPFILE} dist | ||
|
@@ -85,7 +72,7 @@ jobs: | |
with: | ||
inlineScript: | | ||
az storage blob upload-batch -s dist -d \$web --account-name ${{ steps.variables.outputs.AZURE_ACCOUNT }} | ||
- name: Create Release | ||
id: create_release | ||
# Only create a release on one brand to avoid duplicate error | ||
|
@@ -95,7 +82,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Design Guide v${{ steps.gitversion.outputs.majorMinorPatch }} | ||
release_name: Design Guide v${{ steps.variables.outputs.VERSION }} | ||
body_path: RELEASE-NOTES.md | ||
draft: false | ||
prerelease: false | ||
|
@@ -111,4 +98,4 @@ jobs: | |
asset_path: ${{ steps.zip.outputs.zipfile }} | ||
asset_name: ${{ steps.zip.outputs.zipfile }} | ||
asset_content_type: application/zip | ||
|
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