separate workflow to create tag then build
This commit is contained in:
35
.gitea/workflows/create_release.yaml
Normal file
35
.gitea/workflows/create_release.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
name: Build iso when a new version is pushed
|
||||
run-name: iso building
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
|
||||
jobs:
|
||||
build_and_create_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: get repo
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
# - name: install nix
|
||||
# uses: https://github.com/cachix/install-nix-action@v31
|
||||
#
|
||||
# - name: install go
|
||||
# uses: https://github.com/actions/setup-go@v4
|
||||
# with:
|
||||
# go-version: '>=1.20.1'
|
||||
|
||||
#- name: build iso
|
||||
# run: make iso
|
||||
#
|
||||
- name: fetch tags
|
||||
run: git fetch --tags
|
||||
|
||||
- name: create release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
flake.nix
|
||||
api_key: ${{secrets.RELEASE_TOKEN}}
|
22
.gitea/workflows/create_tag.yaml
Normal file
22
.gitea/workflows/create_tag.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
name: Build iso when a new version is pushed
|
||||
run-name: iso building
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
create_and_push_tag:
|
||||
runs-on: ubuntu-latest
|
||||
- name: get repo
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: create tag
|
||||
run: |
|
||||
TAG=$(git rev-parse --short HEAD)
|
||||
echo "Creating tag $TAG"
|
||||
git config user.name "gitea-actions"
|
||||
git config user.email "actions@gitea.com"
|
||||
git tag "$TAG"
|
||||
git push origin "$TAG"
|
@ -1,40 +0,0 @@
|
||||
name: Build iso when a new version is pushed
|
||||
run-name: iso building
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: get repo
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: install nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
|
||||
- name: install go
|
||||
uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
|
||||
#- name: build iso
|
||||
# run: make iso
|
||||
|
||||
- name: get commit tag
|
||||
id: vars
|
||||
run: echo "TAG=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: create tag
|
||||
run: |
|
||||
git config user.name "gitea-actions"
|
||||
git config user.email "actions@gitea.com"
|
||||
git tag ${{steps.vars.outputs.TAG}}
|
||||
git push origin ${{steps.vars.outputs.TAG}}
|
||||
|
||||
- name: create release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
tag_name: ${{steps.vars.outputs.TAG}}
|
||||
files: |-
|
||||
flake.nix
|
||||
api_key: ${{secrets.RELEASE_TOKEN}}
|
Reference in New Issue
Block a user