Skip to content

no need to reinstall now #27

no need to reinstall now

no need to reinstall now #27

Workflow file for this run

name: Release (development)
on:
push:
branches:
- "*"
tags:
- "v*"
jobs:
build:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21
id: go
- name: Checkout code into the Go module directory
uses: actions/checkout@v1
- name: Build binaries
run: |
go generate ./pkg/capacity/...
cd cmds
make
env:
GO111MODULE: on
- name: Set tag of build
id: tag
run: |
ref="${{ github.ref }}"
if [ "${{ github.ref_type }}" = "tag" ]; then
echo "reference=${ref#refs/tags/}" >> $GITHUB_OUTPUT
else
reference="${{ github.sha }}"
echo "reference=${reference:0:7}" >> $GITHUB_OUTPUT
fi
- name: Set version of build
id: version
run: |
echo "version=v$(date +%y%m%d.%-H%M%S)" >> $GITHUB_OUTPUT
- name: Collecting files
run: |
scripts/collect.sh ${{ github.workspace }}/archive
- name: Publish flist (zos:${{ steps.version.outputs.version }}.flist)
if: success()
uses: threefoldtech/publish-flist@master
with:
token: ${{ secrets.HUB_JWT }}
action: publish
user: tf-autobuilder
root: archive
name: zos:${{ steps.version.outputs.version }}.flist
# we tag only if and only if we merged to main
# in that case the tag will be the short sha.
# or if we tagged a certain version and that
# will use the tag value (has to start with v)
- name: Tagging
uses: threefoldtech/publish-flist@master
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
with:
token: ${{ secrets.HUB_JWT }}
action: tag
user: tf-autobuilder
name: ${{ steps.tag.outputs.reference }}/zos.flist
target: tf-autobuilder/zos:${{ steps.version.outputs.version }}.flist
# only for main branch (devnet)
- name: Cross tagging (development)
if: success() && github.ref == 'refs/heads/main'
uses: threefoldtech/publish-flist@master
with:
token: ${{ secrets.HUB_JWT }}
action: crosstag
user: tf-zos
name: development
target: tf-autobuilder/${{ steps.tag.outputs.reference }}
# compatibility with old release
# this is needed so old machines that is already running on devnet
# gets the new code to be able to use the new release tag
- name: Crosslink flist (development)
if: success() && github.ref == 'refs/heads/main'
uses: threefoldtech/publish-flist@master
with:
token: ${{ secrets.HUB_JWT }}
action: crosslink
user: tf-zos
name: zos:development-3:latest.flist
target: tf-autobuilder/zos:${{ steps.version.outputs.version }}.flist