move env to top level

This commit is contained in:
softprops 2019-09-09 17:36:46 +09:00
parent cf0f3ebbb1
commit d27570c9ab
2 changed files with 27 additions and 5 deletions

View file

@ -27,12 +27,34 @@ jobs:
- name: Checkout
uses: actions/checkout@master
- name: Release
uses: docker://softprops/action-gh-release
uses: softprops/action-gh-release
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
You can also use push config tag filter
```yaml
name: Main
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Release
uses: softprops/action-gh-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### ⬆️ Uploading release assets
@ -61,7 +83,7 @@ jobs:
- name: Test
run: cat Release.txt
- name: Release
uses: docker://softprops/action-gh-release
uses: softprops/action-gh-release
if: startsWith(github.ref, 'refs/tags/')
with:
files: Release.txt
@ -89,7 +111,7 @@ jobs:
- name: Generate Changelog
run: echo "# Good things have arrived" > ${{ github.workflow }}-CHANGELOG.txt
- name: Release
uses: docker://softprops/action-gh-release
uses: softprops/action-gh-release
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workflow }}-CHANGELOG.txt

View file

@ -23,13 +23,13 @@ inputs:
description: 'Comma-delimited list of path globs for asset files to upload'
required: false
default: 'empty'
env:
'GITHUB_TOKEN': 'As provided by Github Actions'
runs:
#using: 'docker'
#image: 'docker://softprops:action-gh-action'
using: 'node12'
main: 'lib/main.js'
env:
'GITHUB_TOKEN': 'As provided by Github Actions'
branding:
color: 'green'
icon: 'package'