Skip to content

Merge pull request #15 from IAreKyleW00t/fix/verbose #43

Merge pull request #15 from IAreKyleW00t/fix/verbose

Merge pull request #15 from IAreKyleW00t/fix/verbose #43

Workflow file for this run

name: Main
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test regctl-installer Action
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # let other tests finish
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
cosign: [true, false]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Cosign
uses: sigstore/cosign-installer@v3.4.0
if: matrix.cosign
- name: Install regctl
uses: ./
- name: Test regctl
run: regctl version
main:
name: Publish new version
runs-on: ubuntu-latest
needs: [test]
if: github.event_name == 'push'
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