Skip to content

Install package with sudo for non-root users by default (#546) #58

Install package with sudo for non-root users by default (#546)

Install package with sudo for non-root users by default (#546) #58

Workflow file for this run

name: 'release'
on:
push:
branches:
- master
jobs:
build:
uses: ./.github/workflows/build.yml
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: google-github-actions/release-please-action@v4
id: release
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'latest'
if: ${{ steps.release.outputs.release_created }}
- uses: actions/download-artifact@v4
with:
name: dist
if: ${{ steps.release.outputs.release_created }}
- name: Publish to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
major_version: ${{ steps.release.outputs.major }}
full_version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
tag_name: ${{ steps.release.outputs.tag_name }}
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit --allow-empty --message "Release v${full_version} at ${GITHUB_SHA}"
git tag -d v$major_version || true
git tag -d v$full_version || true
git tag -a v$major_version -m "Release v$full_version"
git tag -a v$full_version -m "Release v$full_version"
git push origin latest
git push origin v$major_version --force
git push origin v$full_version
git tag -a $tag_name $GITHUB_SHA -m "Release v$full_version"
git push origin $tag_name
if: ${{ steps.release.outputs.release_created }}