Skip to content

update license header #97

update license header

update license header #97

Workflow file for this run

# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com) and contributors
# SPDX-FileContributor: Sebastian Thomschke, Vegard IT GmbH
# SPDX-License-Identifier: Apache-2.0
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build
on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.editorconfig'
- '.git*'
- '.github/*.yml'
- 'tool'
pull_request:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
DART_VERSION:
# https://dart.dev/get-dart/archive
- stable
- 3.1.1
OS:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4 #https://github.com/actions/checkout
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.DART_VERSION }}
- name: Cache Dart Pub
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: ${{ runner.os }}-dartpub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-dartpub-
- name: Build
run: |
# set MAY_CREATE_RELEASE variable used by build.sh
if [ "${{ matrix.DART_VERSION }}" == "stable" ] && [ "${{ matrix.OS }}" == "ubuntu-latest" ] && [[ $GITHUB_REF == */main ]]; then
export MAY_CREATE_RELEASE=true
# configure read-write GIT credentials
git config credential.helper "store --file=.git/credentials"
echo "https://${{ secrets.GITHUB_TOKEN }}:@github.com" > .git/credentials 2>/dev/null
export PUBDEV_ACCESS_TOKEN="${{ secrets.PUBDEV_ACCESS_TOKEN }}"
export PUBDEV_REFRESH_TOKEN="${{ secrets.PUBDEV_REFRESH_TOKEN }}"
export PUBDEV_ID_TOKEN="${{ secrets.PUBDEV_ID_TOKEN }}"
export PUBDEV_TOKEN_EXPIRATION="${{ secrets.PUBDEV_TOKEN_EXPIRATION }}"
else
export MAY_CREATE_RELEASE=false
fi
# https://github.community/t/github-actions-bot-email-address/17204
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
bash .ci/build.sh