Skip to content

Commit

Permalink
Merge pull request #419 from DTS-STN/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
zeddotes authored Oct 14, 2022
2 parents 0ec9560 + 5bdfdd5 commit aa752af
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 64 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/build-and-deploy-storybooks.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Generate Pre-release
on:
push:
branches:
- release
jobs:
pre-release:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Install 🔧
run: npm ci
- name: Test 🧪
run: npm run test
env:
CI: true
- name: Create Tarball
run: npm pack
- name: Pre Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Development Build
files: |
*.tgz
33 changes: 33 additions & 0 deletions .github/workflows/publish-package-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,36 @@ jobs:
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_DTSSTN_LOCAL }}
- name: Build Storybooks 🔨
run: npm run build-storybook
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.6.2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
TARGET_FOLDER: ${{ steps.extract_branch.outputs.branch }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: storybook-static # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
- name: Find Comment
if: steps.extract_branch.outputs.branch != 'main'
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: |
Storybooks Link For Branch
https://dts-stn.github.io/Service-Canada-Design-System/${{ steps.extract_branch.outputs.branch }}
- name: Create or update comment # comment in pull request storybooks link
if: steps.extract_branch.outputs.branch != 'main'
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Storybooks Link For Branch
https://dts-stn.github.io/Service-Canada-Design-System/${{ steps.extract_branch.outputs.branch }}
6 changes: 2 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ on:
name: release-please
jobs:
release-please:
if: github.event.pull_request.merged == true
if: startsWith(github.head_ref, 'release-please-') == false && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: 'dts-stn/service-canada-design-system'
changelog-types: '[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"perf","section":"Performance Improvements"},{"type":"test","section":"Tests"},{"type":"docs","section":"Documentation"},{"type":"build","section":"Build System"},{"type":"ops","section":"CI/CD Changes"},{"type":"chore","section":"Miscellaneous Chores"},{"type":"refactor","section":"Refactored"}]'
prerelease: true
default-branch: main


0 comments on commit aa752af

Please sign in to comment.