Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #39 from UKHomeOfficeForms/npm-patch2
Browse files Browse the repository at this point in the history
Update git actions to use checkout v2.2.0
  • Loading branch information
Alex-Swann authored Jun 30, 2021
2 parents c6a4f13 + 6470984 commit 5d51bb6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Automate_Release
name: Automate_Publish
on:
workflow_run:
workflows: ["Automate_Tag"]
Expand All @@ -11,18 +11,23 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/master')
steps:
- uses: actions/checkout@master
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- run: npm install
- run: |
npm_tag="v$(npm dist-tags | sed -n 's/^.* \([0-9].[0-9].[0-9]\)$/\1/p')"
git_tag="$(git describe --abbrev=0)"
if [ "$npm_tag" != "$git_tag" ] ; then npm publish; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- name: 'Publish Release'
uses: Roang-zero1/github-create-release-action@master
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/automate-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -24,7 +24,7 @@ jobs:
!contains(github.event.head_commit.message, '[MAJOR]') &&
!contains(github.event.head_commit.message, '[MINOR]')
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1
with:
node-version: 14
Expand All @@ -42,7 +42,7 @@ jobs:
!contains(github.event.head_commit.message, '[MAJOR]') &&
contains(github.event.head_commit.message, '[MINOR]')
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1
with:
node-version: 14
Expand All @@ -60,7 +60,7 @@ jobs:
contains(github.event.head_commit.message, '[MAJOR]') &&
!contains(github.event.head_commit.message, '[MINOR]')
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1
with:
node-version: 14
Expand Down

0 comments on commit 5d51bb6

Please sign in to comment.