🤹🏻‍♀️

Learning github actions

Learning github actions

These are my notes from https://www.actionsbyexample.com/

Actions are configured by writing “workflows” in YAML files under the directory .github/workflows. These are executed in order of their name

Typical example is,

on:
  push:
    branches:
      - 'main'
jobs:
  build: # Name of the jobs
    runs-on: macos-latest
    env:
      VERSION_NUMBER: 'v0.0.0' # Environment Variable at the job-level
    steps:
      - name: Checking out code # Github action name
        uses: actions/checkout@v3 # Github action to be used
        with:
          fetch-depth: 0 # variables to be used with the above package

Examples:

Questions:

  • How to have incremental build numbers, after merging master?
    • Stuff tried:
      • damienaicheh/[email protected] unable to increment. Even though it gets te tag action properly
    • Stuff that works:
      • {{ github.run_number }}

Packages I use:

  • subosito/flutter-action@v2
    • Use macos flutter to build flutter mac apps
  • marvinpinto/action-automatic-releases@latest
    • Create a Release page
    • unable to figure out how to make incremental release page

Posts