mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-17 07:31:52 +03:00
78 lines
2.7 KiB
YAML
78 lines
2.7 KiB
YAML
|
name: release-npm
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- dev
|
||
|
|
||
|
jobs:
|
||
|
version-or-publish:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
- uses: actions/setup-node@v1
|
||
|
with:
|
||
|
node-version: 12
|
||
|
registry-url: 'https://registry.npmjs.org'
|
||
|
- name: cargo login
|
||
|
run: cargo login ${{ secrets.crate_token }}
|
||
|
- name: git config
|
||
|
run: |
|
||
|
git config --global user.name "${{ github.event.pusher.name }}"
|
||
|
git config --global user.email "${{ github.event.pusher.email }}"
|
||
|
- name: covector version
|
||
|
uses: jbolda/covector/packages/action@covector-v0
|
||
|
id: covector
|
||
|
with:
|
||
|
command: 'version-or-publish'
|
||
|
- name: Create Pull Request With Versions Bumped
|
||
|
if: ${{ steps.covector.outputs.command }} == 'version'
|
||
|
uses: tauri-apps/create-pull-request@v2.8.0
|
||
|
with:
|
||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||
|
branch: release/version-updates
|
||
|
title: Apply Version Updates From Current Changes
|
||
|
commit-message: "apply version updates"
|
||
|
labels: "version updates"
|
||
|
body: ${{ steps.covector.outputs.change }}
|
||
|
|
||
|
tangle:
|
||
|
runs-on: ubuntu-latest
|
||
|
needs: version-or-publish
|
||
|
if: ${{ needs.version-or-publish.outputs.covector.successfulPublish }} == 'true'
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
package:
|
||
|
- name: tauri.js
|
||
|
registryName: tauri
|
||
|
- name: tauri-bundler
|
||
|
registryName: tauri-bundler
|
||
|
- name: tauri-utils
|
||
|
registryName: tauri-utils
|
||
|
- name: tauri-api
|
||
|
registryName: tauri-api
|
||
|
- name: tauri-updater
|
||
|
registryName: tauri-updater
|
||
|
- name: tauri-core
|
||
|
registryName: tauri
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- run: echo ::set-env name=PUBLISHED::$(jq '.${{ matrix.package.name }}.command' ${{ needs.version-or-publish.outputs.covector.change }})
|
||
|
- run: echo ::set-env name=PACKAGE_VERSION::$(jq '.${{ matrix.package.name }}.pkg.pkgFile.version' ${{ needs.version-or-publish.outputs.covector.change }})
|
||
|
- name: Tangle Release
|
||
|
if: env.PUBLISHED != 'false' && !startsWith(env.PUBLISHED, "parse error") && !startsWith(env.PACKAGE_VERSION, "parse error")
|
||
|
id: tangle_release
|
||
|
uses: iotaledger/gh-tangle-release@v0.6.2
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
IOTA_SEED: ${{ secrets.IOTA_SEED }}
|
||
|
IOTA_NODE: "https://iotanode.us:14267"
|
||
|
with:
|
||
|
tag_name: ${{ matrix.package.name }}-v${{ env.PACKAGE_VERSION }}
|
||
|
comment: "Release ${{ matrix.package.name }} v${{ env.PACKAGE_VERSION }} [npmjs.com]"
|