From 1817191d5569bea9b19c25f548117325eda6ed65 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Tue, 8 Oct 2019 19:52:02 -0400 Subject: [PATCH] ci: Isolate upload merge step into stage 2 --- .ci/templates/merge-private.yml | 12 +----------- .ci/templates/merge.yml | 12 +----------- .ci/templates/release-github.yml | 6 ++++-- .ci/templates/release-private-tag.yml | 9 +++++++++ .ci/yuzu-mainline-step2.yml | 4 ++-- .ci/yuzu-patreon-step2.yml | 8 ++++++++ 6 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 .ci/templates/release-private-tag.yml diff --git a/.ci/templates/merge-private.yml b/.ci/templates/merge-private.yml index a640cfbde1..f15a74355c 100644 --- a/.ci/templates/merge-private.yml +++ b/.ci/templates/merge-private.yml @@ -31,17 +31,7 @@ jobs: needSubmodules: 'true' - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh displayName: 'Apply Git Configuration' - - script: git tag -a $(BuildName)-$(Build.BuildId) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName)" - displayName: 'Tag Source' - script: git remote add other $(GitRepoPushChangesURL) displayName: 'Register Repository' - - script: git push --follow-tags --force other HEAD:$(GitPushBranch) + - script: git push --force other HEAD:$(GitPushBranch) displayName: 'Update Code' - - script: git rev-list -n 1 $(BuildName)-$(Build.BuildId) > $(Build.ArtifactStagingDirectory)/tag-commit.sha - displayName: 'Calculate Release Point' - - task: PublishPipelineArtifact@1 - displayName: 'Upload Release Point' - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)/tag-commit.sha' - artifact: 'yuzu-$(BuildName)-release-point' - replaceExistingArchive: true \ No newline at end of file diff --git a/.ci/templates/merge.yml b/.ci/templates/merge.yml index efc82778ae..460dfa1c19 100644 --- a/.ci/templates/merge.yml +++ b/.ci/templates/merge.yml @@ -30,17 +30,7 @@ jobs: needSubmodules: 'true' - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh displayName: 'Apply Git Configuration' - - script: git tag -a $(BuildName)-$(Build.BuildId) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName)" - displayName: 'Tag Source' - script: git remote add other $(GitRepoPushChangesURL) displayName: 'Register Repository' - - script: git push --follow-tags --force other HEAD:$(GitPushBranch) + - script: git push --force other HEAD:$(GitPushBranch) displayName: 'Update Code' - - script: git rev-list -n 1 $(BuildName)-$(Build.BuildId) > $(Build.ArtifactStagingDirectory)/tag-commit.sha - displayName: 'Calculate Release Point' - - task: PublishPipelineArtifact@1 - displayName: 'Upload Release Point' - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)/tag-commit.sha' - artifact: 'yuzu-$(BuildName)-release-point' - replaceExistingArchive: true \ No newline at end of file diff --git a/.ci/templates/release-github.yml b/.ci/templates/release-github.yml index 39fd47f1c3..c200954f14 100644 --- a/.ci/templates/release-github.yml +++ b/.ci/templates/release-github.yml @@ -1,11 +1,13 @@ steps: - template: ./release-download.yml - task: GitHubRelease@0 + displayName: 'GitHub Release' inputs: action: 'create' - title: 'yuzu $(BuildName) #$(Build.BuildId)' + title: '$(ReleasePrefix) $(DisplayVersion)' assets: '$(Build.ArtifactStagingDirectory)/*' gitHubConnection: $(GitHubReleaseConnectionName) repositoryName: '$(Build.Repository.Name)' target: '$(Build.SourceVersion)' - tagSource: 'auto' \ No newline at end of file + tagSource: manual + tag: $(BuildName)-$(DisplayPrefix)-$(DisplayVersion) \ No newline at end of file diff --git a/.ci/templates/release-private-tag.yml b/.ci/templates/release-private-tag.yml new file mode 100644 index 0000000000..e80d575934 --- /dev/null +++ b/.ci/templates/release-private-tag.yml @@ -0,0 +1,9 @@ +steps: + - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh + displayName: 'Apply Git Configuration' + - script: git tag -a $(BuildName)-$(DisplayPrefix)-$(DisplayVersion) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName) $(DisplayPrefix)-$(DisplayVersion)" + displayName: 'Tag Source' + - script: git remote add other $(GitRepoPushChangesURL) + displayName: 'Register Repository' + - script: git push other $(BuildName)-$(DisplayPrefix)-$(DisplayVersion) + displayName: 'Update Code' \ No newline at end of file diff --git a/.ci/yuzu-mainline-step2.yml b/.ci/yuzu-mainline-step2.yml index a098f0a4e6..5f2dfb3d87 100644 --- a/.ci/yuzu-mainline-step2.yml +++ b/.ci/yuzu-mainline-step2.yml @@ -57,12 +57,12 @@ stages: cache: 'true' version: $(DisplayVersion) - stage: release - displayName: 'Release' + displayName: 'release' dependsOn: - build - build_win jobs: - job: github - displayName: 'GitHub Release' + displayName: 'github' steps: - template: ./templates/release-github.yml \ No newline at end of file diff --git a/.ci/yuzu-patreon-step2.yml b/.ci/yuzu-patreon-step2.yml index 6c628350fb..35c5fbe367 100644 --- a/.ci/yuzu-patreon-step2.yml +++ b/.ci/yuzu-patreon-step2.yml @@ -32,3 +32,11 @@ stages: artifactSource: 'false' cache: $(parameters.cache) version: $(DisplayVersion) +- stage: release + displayName: 'release' + dependsOn: build + jobs: + - job: release + displayName: 'source' + steps: + - template: ./templates/release-private-tag.yml