Skip to content

Merge pull request #11 from IAreKyleW00t/fix/verbose #45

Merge pull request #11 from IAreKyleW00t/fix/verbose

Merge pull request #11 from IAreKyleW00t/fix/verbose #45

Workflow file for this run

name: Main
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test crane-installer Action
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
slsa: [true, false]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install SLSA verifier
uses: slsa-framework/slsa-verifier/actions/installer@v2.5.1
if: matrix.slsa && runner.os == 'Linux' # doesn't work on Windows or macOS
- name: Install crane
uses: ./
- name: Test crane
run: crane version
main:
if: ${{ github.event_name == 'push' }}
name: Publish new version
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Bump version tag
id: tag
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update shared tags
run: |
MAJOR=$(echo ${{ steps.tag.outputs.new_version }} | cut -d . -f 1)
MINOR=$(echo ${{ steps.tag.outputs.new_version }} | cut -d . -f 2)
git tag -f v$MAJOR
git tag -f v$MAJOR.$MINOR
git push -f -u origin v$MAJOR
git push -f -u origin v$MAJOR.$MINOR