diff --git a/README.md b/README.md index 71b53e2..6a0005d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index 105e74d..f959787 100644 --- a/action.yml +++ b/action.yml @@ -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' \ No newline at end of file