Merge pull request #151 from nyxx-discord/dev #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
nyxx_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pub-cache | |
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pubspec- | |
- name: 'publish nyxx package to pub.dev' | |
id: publish | |
uses: k-paxian/dart-package-publisher@master | |
with: | |
skipTests: true | |
force: true | |
suppressBuildRunner: true | |
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | |
- name: 'Commit release tag' | |
if: steps.publish.outputs.success | |
uses: hole19/git-tag-action@master | |
env: | |
TAG: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}} | |
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }} | |
- name: 'Create Release' | |
if: steps.publish.outputs.success | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }} | |
with: | |
tag_name: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}} | |
release_name: ${{steps.publish.outputs.localVersion}} | |
body: See CHANGELOG.md for the changes in this version. | |
draft: false | |
prerelease: false |