forked from ghostery/adblocker
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.32 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release
on:
push:
tags: ["v*"]
jobs:
release:
name: Trigger release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Generate the changelog
id: changelog
uses: cliqz-oss/adblocker/actions/generate-changelog@master
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
- name: Commit CHANGELOG.md
if: steps.changelog.updated == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git commit -m "Update CHANGELOG.md [skip ci]" --no-verify --quiet
- name: Push CHANGELOG.md
if: steps.changelog.updated == 'true'
uses: ad-m/github-push-action@v0.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'master'
force: false
- name: Create a GitHub release
uses: cliqz-oss/adblocker/actions/publish-github-release@master
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create an NPM release
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
yarn publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}