Skip to content

Merge pull request #7153 from TheThingsNetwork/feature/clear-codeowners #3015

Merge pull request #7153 from TheThingsNetwork/feature/clear-codeowners

Merge pull request #7153 from TheThingsNetwork/feature/clear-codeowners #3015

name: Snapshot release
on:
push:
branches:
- "v3.*"
workflow_dispatch:
env:
NODE_ENV: production
jobs:
release:
name: Snapshot release
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 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 Docker Hub
uses: docker/login-action@v3
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: Install Go and Dependencies
uses: ./.github/actions/install-go-and-deps
- name: Build Mage
uses: ./.github/actions/build-mage
- name: Install Node and Dependencies
uses: ./.github/actions/install-node-and-deps
- name: Initialize device repository index cache
id: dr-index-cache
uses: actions/cache@v4
with:
path: data/lorawan-devices-index
key: dr-index-cache-${{ hashFiles('data/lorawan-devices') }}
- name: Create device repository index
run: tools/bin/mage dev:initDeviceRepo
if: steps.dr-index-cache.outputs.cache-hit != 'true'
- name: Build Frontend
uses: ./.github/actions/build-frontend
with:
production-sourcemaps: "true"
- name: Check for diff
run: tools/bin/mage git:diff
- name: Import the signing key
run: |
printf '%s' '${{ secrets.SIGNATURE_PASSPHRASE }}' >/tmp/gpg_passphrase
cat /tmp/gpg_passphrase | gpg --passphrase-fd 0 --no-tty --batch --import gpg_signing_key
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: "v1.18.2"
args: release --config .goreleaser.snapshot.yml --snapshot --timeout 60m
env:
SIGN_KEY_NAME: ${{ secrets.SIGN_KEY_NAME }}
- name: Tag and Push Docker images
run: |
docker tag lorawan-stack-dev:${{ github.sha }}-amd64 ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-amd64
docker tag lorawan-stack-dev:${{ github.sha }}-arm64 ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-arm64
docker push ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-amd64
docker push ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-arm64
docker manifest create ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }} ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-amd64 ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}-arm64
docker manifest push ${DOCKER_PREFIX}/lorawan-stack-dev:${{ github.sha }}
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_PREFIX: thethingsnetwork