Skip to content

upgraded to latest version of dcli. #130

upgraded to latest version of dcli.

upgraded to latest version of dcli. #130

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: compile
on:
push:
branches: [ main ]
# the release proces will fail if we run it without a tag.
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+' # only release when a tag is pushed of the form vx.x.x
jobs:
compile:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: dart format --output=none --set-exit-if-changed .
- name: Delete Test and Tool dir so analyze runs
run: |
rm -r test
rm -r tool
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: dart analyze
- name: Create release dir
run: mkdir bin/${{ runner.os }}
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run compile opub
run: dart compile exe bin/opub.dart -o bin/${{ runner.os }}/opub
- name: Run compile onepub
run: dart compile exe bin/onepub.dart -o bin/${{ runner.os }}/onepub
- name: Release opub and onepub
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
name: ${{ runner.os }}/${{github.ref_name}}
tag_name: ${{ runner.os }}/${{github.ref_name}}
files: |
bin/${{ runner.os }}/opub
bin/${{ runner.os }}/onepub
- name: Delete old latest so we can replace
uses: dev-drprasad/[email protected]
with:
delete_release: true # default: false
tag_name: ${{ runner.os }}/latest # tag name to delete
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release opub and onepub as latest
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
name: ${{ runner.os }}/latest
tag_name: ${{ runner.os }}/latest
files: |
bin/${{ runner.os }}/opub
bin/${{ runner.os }}/onepub