Skip to content

Yarn error enhancements (#168) #54

Yarn error enhancements (#168)

Yarn error enhancements (#168) #54

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: '>=1.20'
cache: true
- name: Import GPG signing key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Pull Supported Formats
run: |
cd cmd/debricked
go generate -v -x
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
aur:
runs-on: ubuntu-latest
needs: goreleaser
container:
image: archlinux/archlinux:base-devel
steps:
- name: Prepare Arch Linux container
run: |
pacman -Syu --noconfirm git go openssh pacman-contrib
useradd -m aur
# Setup SSH access to aur.archlinux.org
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
# Now actually clone AUR repo, and update to new version
- name: Build package and update AUR
run: |
export NEW_VERSION="${GITHUB_REF_NAME#v}"
sudo -u aur sh -c "mkdir -p /home/aur/.ssh && chmod 700 /home/aur/.ssh && touch /home/aur/.ssh/known_hosts && chmod 600 /home/aur/.ssh/known_hosts"
sudo -u aur sh -c "echo 'aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN' >> /home/aur/.ssh/known_hosts"
mkdir -p /root/.ssh && chmod 700 /root/.ssh && cp /home/aur/.ssh/known_hosts /root/.ssh/known_hosts && chown root: /root/.ssh/known_hosts
# clone repo
git clone [email protected]:debricked.git debricked
chown -R aur debricked/
cd debricked/
sudo -u aur NEW_VERSION="${NEW_VERSION}" make update_version
sudo -u aur make package
sudo -u aur git diff
sudo -u aur git config user.email [email protected]
sudo -u aur git config user.name "Debricked build bot"
git config --global --add safe.directory "$PWD"
make push