Skip to content

feat: use more accurate projectID + Kubernetes node name method to re… #13

feat: use more accurate projectID + Kubernetes node name method to re…

feat: use more accurate projectID + Kubernetes node name method to re… #13

Workflow file for this run

name: semver tag
on:
push:
branches:
- main
permissions:
contents: write
attestations: write
packages: write
env:
CRUSOE_CSI_DRIVER_NAME: csi.crusoe.ai
jobs:
semver-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Git
run: |
git config user.name "crusoe-cloud"
git config user.email "[email protected]"
- name: Load versions from text file
run: |
source versions.env
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> $GITHUB_ENV
echo "MINOR_VERSION=${MINOR_VERSION}" >> $GITHUB_ENV
- name: Calculate and set new version
run: |
chmod +x ./scripts/tag_semver.sh
./scripts/tag_semver.sh $MAJOR_VERSION $MINOR_VERSION ""
shell: bash
- name: Read version and push tag
run: |
source variables.env
echo "Calculated version: $RELEASE_VERSION"
source variables.env
git tag $RELEASE_VERSION
git push origin $RELEASE_VERSION
goreleaser:
needs: semver-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: 'go.mod'
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41 # v5.3.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
args: release --clean
version: 2.1.x
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}