ci: add missing permissions for release step #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: back-compat | |
on: | |
push: | |
branches: ["main"] | |
permissions: | |
contents: read | |
env: | |
GO_VERSION: '1.23.5' | |
jobs: | |
check-back-compat: | |
name: build | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- run: git checkout HEAD~1 | |
- name: build last commit | |
run: | | |
go build -o hours_prev | |
cp hours_prev /var/tmp | |
rm hours_prev | |
- run: git checkout main | |
- name: build head | |
run: | | |
go build -o hours_head | |
cp hours_head /var/tmp | |
rm hours_head | |
- name: Run last version | |
run: | | |
/var/tmp/hours_prev --dbpath=/var/tmp/throwaway-empty.db report 3d -p | |
/var/tmp/hours_prev --dbpath=/var/tmp/throwaway-with-data.db gen -y | |
- name: Run current version | |
run: | | |
echo "empty" | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-empty.db report 3d -p | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-empty.db log 3d -p | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-empty.db stats 3d -p | |
echo "with data" | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-with-data.db report 3d -p | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-with-data.db log 3d -p | |
/var/tmp/hours_head --dbpath=/var/tmp/throwaway-with-data.db stats 3d -p |