Skip to content

docs: try another action #356

docs: try another action

docs: try another action #356

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
commitlint:
runs-on: ubuntu-latest
name: commitlint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Deps
run: yarn install
- name: Lint PR Title
run: yarn commitlint --from "${{ github.event.before }}"
release:
name: release
needs: commitlint
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: elixir
package-name: next_ls
bump-minor-pre-major: true
extra-files: |
flake.nix
draft:
needs: release
if: ${{ needs.release.outputs.release_created }}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: gh release edit ${{ needs.release.outputs.tag_name }} --draft=true --repo='elixir-tools/next-ls'
build:
needs: [release, draft]
runs-on: macos-14
if: ${{ needs.release.outputs.release_created }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: cachix/cachix-action@v14
with:
name: elixir-tools
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop --command bash -c 'mix local.hex --force'
- run: nix develop --command bash -c 'mix local.rebar --force'
- run: nix develop --command bash -c 'mix deps.get --only prod'
- run: chmod +x priv/cmd
- run: nix develop --command bash -c 'mix release'
env:
MIX_ENV: prod
- name: Create Checksum
run: |
cd ./burrito_out
chmod +x ./*
shasum -a 256 ./* > next_ls_checksums.txt
cd ..
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.token }}
run: gh release upload ${{ needs.release.outputs.tag_name }} ./burrito_out/*
publish:
name: publish
needs: [release, build]
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: gh release edit ${{ needs.release.outputs.tag_name }} --draft=false --repo='elixir-tools/next-ls'