Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

add tags to release.yml #4

Merged
merged 27 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8af524b
remove tags step in release.yml
itsmostafa Jan 30, 2023
8700dd4
fix github token
itsmostafa Jan 30, 2023
80e8333
fix github token
itsmostafa Jan 30, 2023
a8f3ea1
Merge branch 'develop' into feature/add-release-actions
itsmostafa Jan 30, 2023
8b67123
add caching step
itsmostafa Jan 30, 2023
c567817
add goreleaser.yml
itsmostafa Jan 30, 2023
e91763b
add push on tags
itsmostafa Jan 30, 2023
e788ff6
remove gorelease for alternative solution
itsmostafa Jan 30, 2023
ede4bb9
remove gorelease for alternative solution
itsmostafa Jan 30, 2023
743c0e7
comment out tags
itsmostafa Jan 30, 2023
44eb8c3
update release steps
itsmostafa Jan 30, 2023
4430696
add back build name
itsmostafa Jan 30, 2023
a8109e7
fix build app step
itsmostafa Jan 30, 2023
c1b5387
fix release step
itsmostafa Jan 30, 2023
1d1c6d1
update work dir for release
itsmostafa Jan 30, 2023
548c52f
update release step
itsmostafa Jan 30, 2023
870785e
fixes
itsmostafa Jan 30, 2023
e79d298
fix build step
itsmostafa Jan 30, 2023
fae4279
fix release step
itsmostafa Jan 30, 2023
b399550
revert build.yml
itsmostafa Jan 31, 2023
c202607
fix: github-script step in release.yml
itsmostafa Jan 31, 2023
aa5ba05
add auto-tag step to release
itsmostafa Feb 1, 2023
6724790
add autotag step to release
itsmostafa Feb 1, 2023
768611a
add new version for teesting
itsmostafa Feb 1, 2023
b8c277d
export-ignore all files
itsmostafa Feb 1, 2023
c62fa9e
fix: typo in build names
itsmostafa Feb 1, 2023
5d12d6b
limit releases to merges to develop
itsmostafa Feb 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: release

on:
push:
tags:
- "*" # triggers only if push new tag version
# branches:
# - develop

jobs:
build:
Expand All @@ -17,16 +17,31 @@ jobs:
with:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/

- name: Set up go
uses: actions/setup-go@v2
- id: setup-go
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
go-version: "1.19"
cache: true
- name: Lookup Go cache directory
id: go-cache
run: |
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
env:
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
go${{ steps.setup-go.outputs.go-version }}-"
with:
path: |
${{ steps.go-cache.outputs.dir }}
key: "${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('go.mod') }}-\
${{ hashFiles('go.sum') }}"
restore-keys: |
${{ env.BASE_CACHE_KEY }}
- name: run goreleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
args: release --snapshot --rm-dist # snapshot allows releases without tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
project_name: con-pca-tasks

builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- darwin
goarch:
- amd64
- arm64