Skip to content

Commit

Permalink
Update to new github actions flow
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Nov 30, 2019
1 parent 5e4b1cb commit 7bbf131
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
name: Publish

on:
create:
release:
types: [published]

jobs:
publish:
name: Publish

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
registry-url: "https://registry.npmjs.org/"

- name: Install
run: yarn --frozen-lockfile --non-interactive

- name: Setup git and yarn
run: |
git config user.email "admin@minidigger.me"
git config user.name "MiniDigger"
yarn config set version-git-tag false
- name: Bump version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version=$(echo "$GITHUB_REF" | sed "s/refs\/tags\/v//")
echo "Bumping version to $version"
yarn version --new-version $version
git add package.json
git commit -m "Bump version to $version"
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" HEAD:master
- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
"bugs": {
"url": "https://github.com/MiniDigger/thelounge-plugin-giphy/issues"
},
"scripts": {
"postversion": "git push --tags"
},
"thelounge": {
"name": "Giphy",
"type": "plugin"
Expand Down

0 comments on commit 7bbf131

Please sign in to comment.