Skip to content

chore(deps): bump castore from 1.0.9 to 1.0.10 (#82) #82

chore(deps): bump castore from 1.0.9 to 1.0.10 (#82)

chore(deps): bump castore from 1.0.9 to 1.0.10 (#82) #82

Workflow file for this run

name: mix git_ops.release
on:
push:
branches:
- main
jobs:
maybe_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
elixir-version: "1.15.7"
otp-version: "26.1.2"
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Configure git author
run: git config user.email '25500012+github-actions[bot]@users.noreply.github.com' ; git config user.name 'github-actions'
- name: Retrieving the current app version
id: original-app-info
run: MIX_ENV=test mix git_ops.project_info --format github-actions
- name: Run mix git_ops.release
run: MIX_ENV=test mix git_ops.release --yes || true
- name: Checking for new app version
id: app-info
run: MIX_ENV=test mix git_ops.project_info --format github-actions
- name: Building hex package
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
run: mix hex.build -o ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
- name: Building hex docs
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
run: MIX_ENV=test mix docs && tar zcvf ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}-docs.tar.gz doc/
- name: Pushing new tag
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
run: git push "https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}" HEAD:${{ github.ref }} refs/tags/v${{ steps.app-info.outputs.app_version }}
- name: Creating new Github release
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: v${{ steps.app-info.outputs.app_version }}
release_name: Release ${{ steps.app-info.outputs.app_name }} ${{ steps.app-info.outputs.app_version }}
body: Autogenerated by git_ops release.
- name: Uploading hex package as release artifact
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
id: upload-package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
asset_name: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
asset_content_type: application/x-tar
- name: Uploading documentation as release artifact
if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
id: upload-docs
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}-docs.tar.gz
asset_name: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}-docs.tar.gz
asset_content_type: application/gzip
# - name: Publishing hex package
# if: ${{ steps.original-app-info.outputs.app_version != steps.app-info.outputs.app_version }}
# run: mix hex.publish --yes